mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-24 18:36:18 +04:00
Update tree-sitter-robot (#7970)
* Update tree-sitter-robot * Update Robot highlights query for Helix * Change @comment.single to @comment Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
2b7e7c80eb
commit
18a79aa3bf
@ -1567,7 +1567,7 @@ language-servers = [ "robotframework_ls" ]
|
||||
|
||||
[[grammar]]
|
||||
name = "robot"
|
||||
source = { git = "https://github.com/Hubro/tree-sitter-robot", rev = "f1142bfaa6acfce95e25d2c6d18d218f4f533927" }
|
||||
source = { git = "https://github.com/Hubro/tree-sitter-robot", rev = "322e4cc65754d2b3fdef4f2f8a71e0762e3d13af" }
|
||||
|
||||
[[language]]
|
||||
name = "r"
|
||||
|
@ -1,21 +1,59 @@
|
||||
(comment) @comment
|
||||
(ellipses) @punctuation.delimiter
|
||||
[
|
||||
(comment)
|
||||
(extra_text)
|
||||
] @comment
|
||||
|
||||
(section_header) @keyword
|
||||
(extra_text) @comment
|
||||
|
||||
(setting_statement) @keyword
|
||||
[
|
||||
(section_header)
|
||||
(setting_statement)
|
||||
(keyword_setting)
|
||||
(test_case_setting)
|
||||
] @keyword
|
||||
|
||||
(variable_definition (variable_name) @variable)
|
||||
|
||||
(keyword_definition (name) @function)
|
||||
(keyword_definition (body (keyword_setting) @keyword))
|
||||
|
||||
(test_case_definition (name) @property)
|
||||
(test_case_definition (name) @function)
|
||||
|
||||
(keyword_invocation (keyword) @function)
|
||||
(ellipses) @punctuation.delimiter
|
||||
|
||||
(argument (text_chunk) @string)
|
||||
(argument (scalar_variable) @string.special)
|
||||
(argument (list_variable) @string.special)
|
||||
(argument (dictionary_variable) @string.special)
|
||||
(text_chunk) @string
|
||||
(inline_python_expression) @string.special
|
||||
[
|
||||
(scalar_variable)
|
||||
(list_variable)
|
||||
(dictionary_variable)
|
||||
] @variable
|
||||
|
||||
; Control structures
|
||||
|
||||
"RETURN" @keyword.control.return
|
||||
|
||||
[
|
||||
"FOR"
|
||||
"IN"
|
||||
"IN RANGE"
|
||||
"IN ENUMERATE"
|
||||
"IN ZIP"
|
||||
(break_statement)
|
||||
(continue_statement)
|
||||
] @keyword.control.repeat
|
||||
(for_statement "END" @keyword.control.repeat)
|
||||
|
||||
"WHILE" @keyword.control.repeat
|
||||
(while_statement "END" @keyword.control.repeat)
|
||||
|
||||
[
|
||||
"IF"
|
||||
"ELSE IF"
|
||||
] @keyword.control.conditional
|
||||
(if_statement "END" @keyword.control.conditional)
|
||||
(if_statement (else_statement "ELSE" @keyword.control.conditional))
|
||||
|
||||
[
|
||||
"TRY"
|
||||
"EXCEPT"
|
||||
"FINALLY"
|
||||
] @keyword.control.exception
|
||||
(try_statement "END" @keyword.control.exception)
|
||||
(try_statement (else_statement "ELSE" @keyword.control.exception))
|
||||
|
Loading…
Reference in New Issue
Block a user