mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 17:30:08 -04:00
fix: update to pass all tests
This commit is contained in:
parent
d3d701cf2f
commit
a266dca64d
2 changed files with 81 additions and 80 deletions
|
|
@ -1,132 +1,133 @@
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
(property_identifier) @property
|
(property_identifier) @property
|
||||||
|
|
||||||
(string_literal) @string
|
(string_literal) @string
|
||||||
|
|
||||||
(string_literal_begin) @string
|
(string_literal_begin) @string
|
||||||
|
|
||||||
(string_literal_continuation) @string
|
(string_literal_continuation) @string
|
||||||
|
|
||||||
(string_literal_end) @string
|
(string_literal_end) @string
|
||||||
|
|
||||||
[
|
[
|
||||||
"case"
|
"case"
|
||||||
"default"
|
"default"
|
||||||
"else"
|
"else"
|
||||||
"if"
|
"if"
|
||||||
"switch"
|
"switch"
|
||||||
] @keyword.conditional
|
] @keyword.conditional
|
||||||
|
|
||||||
[
|
"import" @keyword.import
|
||||||
"import"
|
|
||||||
] @keyword.import
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"for"
|
"for"
|
||||||
"loop"
|
"loop"
|
||||||
"repeat"
|
"repeat"
|
||||||
"while"
|
"while"
|
||||||
] @keyword.repeat
|
] @keyword.repeat
|
||||||
|
|
||||||
(for_statement
|
(for_statement
|
||||||
"in" @keyword.repeat)
|
"in" @keyword.repeat)
|
||||||
|
|
||||||
|
"class" @keyword.type
|
||||||
|
|
||||||
[
|
[
|
||||||
"class"
|
"return"
|
||||||
] @keyword.type
|
"yield"
|
||||||
|
|
||||||
[
|
|
||||||
"return"
|
|
||||||
"yield"
|
|
||||||
] @keyword.return
|
] @keyword.return
|
||||||
|
|
||||||
[
|
[
|
||||||
"catch"
|
"catch"
|
||||||
"defer"
|
"defer"
|
||||||
"throw"
|
"throw"
|
||||||
"try"
|
"try"
|
||||||
] @keyword.exception
|
] @keyword.exception
|
||||||
|
|
||||||
[
|
[
|
||||||
"constructor"
|
"constructor"
|
||||||
"fun"
|
"fun"
|
||||||
"=>"
|
"=>"
|
||||||
] @keyword.function
|
] @keyword.function
|
||||||
|
|
||||||
[
|
[
|
||||||
"_"
|
"_"
|
||||||
(line)
|
(line)
|
||||||
"assert"
|
"assert"
|
||||||
;"async"
|
;"async"
|
||||||
(break_statement)
|
(break_statement)
|
||||||
"const"
|
"const"
|
||||||
(continue_statement)
|
(continue_statement)
|
||||||
"do"
|
"do"
|
||||||
"extends"
|
"extends"
|
||||||
(fallthrough_statement)
|
(fallthrough_statement)
|
||||||
;"get"
|
;"get"
|
||||||
;"match"
|
;"match"
|
||||||
"public"
|
"public"
|
||||||
;"set"
|
;"set"
|
||||||
;"static"
|
;"static"
|
||||||
"var"
|
"var"
|
||||||
"with"
|
"with"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
[
|
[
|
||||||
(this)
|
(this)
|
||||||
(super)
|
(super)
|
||||||
] @variable.builtin
|
] @variable.builtin
|
||||||
|
|
||||||
[
|
[
|
||||||
(false)
|
(false)
|
||||||
(true)
|
(true)
|
||||||
] @boolean
|
] @boolean
|
||||||
|
|
||||||
[
|
(void) @constant.builtin
|
||||||
(void)
|
|
||||||
] @constant.builtin
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"("
|
"("
|
||||||
")"
|
")"
|
||||||
"["
|
"["
|
||||||
"]"
|
"]"
|
||||||
"{"
|
"{"
|
||||||
"}"
|
"}"
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
[
|
[
|
||||||
";"
|
";"
|
||||||
":"
|
":"
|
||||||
"."
|
"."
|
||||||
","
|
","
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
[
|
[
|
||||||
(arithmetic_assignment_operator)
|
(arithmetic_assignment_operator)
|
||||||
(comparison_operator)
|
(comparison_operator)
|
||||||
(bitwise_operator)
|
(bitwise_operator)
|
||||||
(additive_operator)
|
(additive_operator)
|
||||||
(multiplicative_operator)
|
(multiplicative_operator)
|
||||||
(logical_operator)
|
(logical_operator)
|
||||||
(unary_operator)
|
(unary_operator)
|
||||||
"->"
|
"->"
|
||||||
"..."
|
"..."
|
||||||
"="
|
"="
|
||||||
"?"
|
"?"
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
(conditional_expression
|
(conditional_expression
|
||||||
[
|
[
|
||||||
"?"
|
"?"
|
||||||
":"
|
":"
|
||||||
] @keyword.conditional.ternary)
|
] @keyword.conditional.ternary)
|
||||||
|
|
||||||
(class_member
|
(class_member
|
||||||
(function_decl
|
(function_decl
|
||||||
name: (identifier) @function.method))
|
name: (identifier) @function.method))
|
||||||
|
|
||||||
(function_decl
|
(function_decl
|
||||||
name: (identifier) @function)
|
name: (identifier) @function)
|
||||||
|
|
||||||
(class_decl
|
(class_decl
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
(#set! definition.var.scope parent))
|
(#set! definition.var.scope parent))
|
||||||
|
|
||||||
(class_decl
|
(class_decl
|
||||||
name: (identifier) @local.definition.class
|
name: (identifier) @local.definition.type
|
||||||
(#set! definition.var.scope parent))
|
(#set! definition.var.scope parent))
|
||||||
|
|
||||||
; References
|
; References
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue