feat!: drop modules, general refactor and cleanup

This commit is contained in:
Christian Clason 2023-06-12 09:54:30 -06:00
parent 310f0925ec
commit 692b051b09
1247 changed files with 6096 additions and 9074 deletions

View file

@ -0,0 +1,6 @@
[
(macro)
(memory_execution)
(subroutine)
(comment)
] @fold

View file

@ -0,0 +1,87 @@
; Includes
(include
"~" @keyword.import
_ @string.special.url)
; Variables
(identifier) @variable
; Macros
(macro
"%"
(identifier) @function.macro)
((identifier) @function.macro
(#lua-match? @function.macro "^[a-z]?[0-9]*[A-Z-_]+$"))
(rune
.
rune_start: (rune_char
",")
.
(identifier) @function.call)
(rune
.
rune_start: (rune_char
";")
.
(identifier) @function.call)
((identifier) @function.call
(#lua-match? @function.call "^:"))
; Keywords
(opcode) @keyword
; Labels
(label
"@" @string.special.symbol
(identifier) @function)
(sublabel_reference
(identifier) @module
"/" @punctuation.delimiter
(identifier) @label)
; Repeats
((identifier) @keyword.repeat
(#eq? @keyword.repeat "while"))
; Literals
(raw_ascii) @string
(hex_literal
"#" @string.special.symbol
(hex_lit_value) @string.special)
(number) @number
; Punctuation
[
"{"
"}"
] @punctuation.bracket
[
"["
"]"
] @punctuation.bracket
[
"%"
"|"
"$"
","
"_"
"."
"-"
";"
"="
"!"
"?"
"&"
] @punctuation.special
; Comments
(comment) @comment @spell

View file

@ -0,0 +1,23 @@
(memory_execution) @indent.auto
[
(subroutine)
(brackets)
] @indent.begin
"}" @indent.end
[
"{"
"}"
] @indent.branch
[
"["
"]"
] @indent.branch
[
(ERROR)
(comment)
] @indent.auto

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))

View file

@ -0,0 +1,21 @@
; Scopes
[
(program)
(macro)
(memory_execution)
(subroutine)
] @local.scope
; References
(identifier) @local.reference
; Definitions
(label
"@"
.
(identifier) @local.definition.function)
(macro
"%"
.
(identifier) @local.definition.macro)