on master help sign in
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>

commit18a79aa3bf4bfc1569d104eaab5652ccccc217b3 authorTomas Sandven <597206+Hubro@users.noreply.github.com> dateFri 18 Aug 2023, 22:48 (3 years ago) parent2b7e7c8
2 files changed+52−14
languages.toml+1−1 runtime/queries/robot/highlights.scm+51−13
languages.toml+1−1
@@ -1567,7 +1567,7 @@ language-servers = [ "robotframework_ls" ]
15671567
15681568[[grammar]]
15691569name = "robot"
1570−source = { git = "https://github.com/Hubro/tree-sitter-robot", rev = "f1142bfaa6acfce95e25d2c6d18d218f4f533927" }
1570+source = { git = "https://github.com/Hubro/tree-sitter-robot", rev = "322e4cc65754d2b3fdef4f2f8a71e0762e3d13af" }
15711571
15721572[[language]]
15731573name = "r"
runtime/queries/robot/highlights.scm+51−13
@@ -1,21 +1,59 @@
1−(comment) @comment
1+[
2+ (comment)
3+ (extra_text)
4+] @comment
5+
6+[
7+ (section_header)
8+ (setting_statement)
9+ (keyword_setting)
10+ (test_case_setting)
11+] @keyword
12+
13+(variable_definition (variable_name) @variable)
14+(keyword_definition (name) @function)
15+(test_case_definition (name) @function)
16+
17+(keyword_invocation (keyword) @function)
218(ellipses) @punctuation.delimiter
319
4−(section_header) @keyword
5−(extra_text) @comment
20+(text_chunk) @string
21+(inline_python_expression) @string.special
22+[
23+ (scalar_variable)
24+ (list_variable)
25+ (dictionary_variable)
26+] @variable
627
7−(setting_statement) @keyword
28+; Control structures
829
9−(variable_definition (variable_name) @variable)
30+"RETURN" @keyword.control.return
1031
11−(keyword_definition (name) @function)
12−(keyword_definition (body (keyword_setting) @keyword))
32+[
33+ "FOR"
34+ "IN"
35+ "IN RANGE"
36+ "IN ENUMERATE"
37+ "IN ZIP"
38+ (break_statement)
39+ (continue_statement)
40+] @keyword.control.repeat
41+(for_statement "END" @keyword.control.repeat)
1342
14−(test_case_definition (name) @property)
43+"WHILE" @keyword.control.repeat
44+(while_statement "END" @keyword.control.repeat)
1545
16−(keyword_invocation (keyword) @function)
46+[
47+ "IF"
48+ "ELSE IF"
49+] @keyword.control.conditional
50+(if_statement "END" @keyword.control.conditional)
51+(if_statement (else_statement "ELSE" @keyword.control.conditional))
1752
18−(argument (text_chunk) @string)
19−(argument (scalar_variable) @string.special)
20−(argument (list_variable) @string.special)
21−(argument (dictionary_variable) @string.special)
53+[
54+ "TRY"
55+ "EXCEPT"
56+ "FINALLY"
57+] @keyword.control.exception
58+(try_statement "END" @keyword.control.exception)
59+(try_statement (else_statement "ELSE" @keyword.control.exception))