Align keywords to match behaviour for other languages

This commit is contained in:
MrSubidubi 2025-03-05 00:50:42 +01:00
parent a578095b86
commit 813e207514

View file

@ -1,74 +1,23 @@
;; Keywords ;; Keywords
"return" @keyword
[
"goto"
"in"
"local"
] @keyword
(break_statement) @keyword
(do_statement
[ [
"do" "do"
"end"
] @keyword)
(while_statement
[
"while"
"do"
"end"
] @keyword)
(repeat_statement
[
"repeat"
"until"
] @keyword)
(if_statement
[
"if"
"elseif"
"else" "else"
"then"
"end"
] @keyword)
(elseif_statement
[
"elseif" "elseif"
"then"
"end" "end"
] @keyword)
(else_statement
[
"else"
"end"
] @keyword)
(for_statement
[
"for" "for"
"do"
"end"
] @keyword)
(function_declaration
[
"function" "function"
"end" "goto"
] @keyword) "if"
"in"
(function_definition "local"
[ "repeat"
"function" "return"
"end" "then"
] @keyword) "until"
"while"
(break_statement)
] @keyword
;; Operators ;; Operators