Add more structured syntax

This commit is contained in:
E Dunbar 2025-05-13 16:17:42 -05:00
parent d330f85c67
commit 66026fe74b
11 changed files with 18956 additions and 4528 deletions

View file

@ -1,16 +1,28 @@
; Variables
(symbol) @variable
[
(symbol)
(immediate_symbol)
] @variable
(keyword) @property
; Symbol naming conventions
((symbol) @type
([
(symbol)
(immediate_symbol)
] @type
(#lua-match? @type "^[A-Z].*[a-z]"))
((symbol) @constant
([
(symbol)
(immediate_symbol)
] @constant
(#lua-match? @constant "^[A-Z][A-Z0-9_-]*$"))
((symbol) @constant.builtin
([
(symbol)
(immediate_symbol)
] @constant.builtin
(#lua-match? @constant.builtin "^__[a-zA-Z0-9_-]*__$"))
((symbol) @constant.builtin
@ -186,3 +198,6 @@
(dotted_identifier
"." @punctuation.delimiter)
(keyword
":" @punctuation.delimiter)