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
[ [
"do"
"else"
"elseif"
"end"
"for"
"function"
"goto" "goto"
"if"
"in" "in"
"local" "local"
] @keyword
(break_statement) @keyword
(do_statement
[
"do"
"end"
] @keyword)
(while_statement
[
"while"
"do"
"end"
] @keyword)
(repeat_statement
[
"repeat" "repeat"
"return"
"then"
"until" "until"
] @keyword) "while"
(break_statement)
(if_statement ] @keyword
[
"if"
"elseif"
"else"
"then"
"end"
] @keyword)
(elseif_statement
[
"elseif"
"then"
"end"
] @keyword)
(else_statement
[
"else"
"end"
] @keyword)
(for_statement
[
"for"
"do"
"end"
] @keyword)
(function_declaration
[
"function"
"end"
] @keyword)
(function_definition
[
"function"
"end"
] @keyword)
;; Operators ;; Operators