2023-08-19 00:48:47 +04:00
|
|
|
[
|
|
|
|
(comment)
|
|
|
|
(extra_text)
|
|
|
|
] @comment
|
|
|
|
|
|
|
|
[
|
|
|
|
(section_header)
|
|
|
|
(setting_statement)
|
|
|
|
(keyword_setting)
|
|
|
|
(test_case_setting)
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
(variable_definition (variable_name) @variable)
|
|
|
|
(keyword_definition (name) @function)
|
|
|
|
(test_case_definition (name) @function)
|
|
|
|
|
|
|
|
(keyword_invocation (keyword) @function)
|
2023-04-07 04:19:48 +04:00
|
|
|
(ellipses) @punctuation.delimiter
|
|
|
|
|
2023-08-19 00:48:47 +04:00
|
|
|
(text_chunk) @string
|
|
|
|
(inline_python_expression) @string.special
|
|
|
|
[
|
|
|
|
(scalar_variable)
|
|
|
|
(list_variable)
|
|
|
|
(dictionary_variable)
|
|
|
|
] @variable
|
2023-04-07 04:19:48 +04:00
|
|
|
|
2023-08-19 00:48:47 +04:00
|
|
|
; Control structures
|
2023-04-07 04:19:48 +04:00
|
|
|
|
2023-08-19 00:48:47 +04:00
|
|
|
"RETURN" @keyword.control.return
|
2023-04-07 04:19:48 +04:00
|
|
|
|
2023-08-19 00:48:47 +04:00
|
|
|
[
|
|
|
|
"FOR"
|
|
|
|
"IN"
|
|
|
|
"IN RANGE"
|
|
|
|
"IN ENUMERATE"
|
|
|
|
"IN ZIP"
|
|
|
|
(break_statement)
|
|
|
|
(continue_statement)
|
|
|
|
] @keyword.control.repeat
|
|
|
|
(for_statement "END" @keyword.control.repeat)
|
2023-04-07 04:19:48 +04:00
|
|
|
|
2023-08-19 00:48:47 +04:00
|
|
|
"WHILE" @keyword.control.repeat
|
|
|
|
(while_statement "END" @keyword.control.repeat)
|
2023-04-07 04:19:48 +04:00
|
|
|
|
2023-08-19 00:48:47 +04:00
|
|
|
[
|
|
|
|
"IF"
|
|
|
|
"ELSE IF"
|
|
|
|
] @keyword.control.conditional
|
|
|
|
(if_statement "END" @keyword.control.conditional)
|
|
|
|
(if_statement (else_statement "ELSE" @keyword.control.conditional))
|
2023-04-07 04:19:48 +04:00
|
|
|
|
2023-08-19 00:48:47 +04:00
|
|
|
[
|
|
|
|
"TRY"
|
|
|
|
"EXCEPT"
|
|
|
|
"FINALLY"
|
|
|
|
] @keyword.control.exception
|
|
|
|
(try_statement "END" @keyword.control.exception)
|
|
|
|
(try_statement (else_statement "ELSE" @keyword.control.exception))
|