Fix HDL and Hack Assembly syntax highlighting and queries

- Fixed HDL highlights query syntax error with #match? predicate
- Replaced #match? with #any-of? for exact string matching
- Fixed Hack Assembly outline query invalid field name
- Improved HDL syntax highlighting with comprehensive patterns
- Added HDL bracket matching for all syntax types
- Fixed XML scope mismatch from text.xml to source.xml
- Enhanced outline queries for better code navigation
This commit is contained in:
2025-09-11 11:24:24 -04:00
commit c231dbfd27
133 changed files with 2792 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
; Test script syntax highlighting queries based on actual node types
; Commands
"load" @keyword
"output-file" @keyword
"compare-to" @keyword
"output-list" @keyword
"set" @keyword
"eval" @keyword
"output" @keyword
"tick" @keyword
"tock" @keyword
"ticktock" @keyword
"repeat" @keyword
"while" @keyword
"echo" @keyword
; Control flow keywords
"repeat" @keyword.control
"while" @keyword.control
; File operations
(load_command "load" @keyword)
(output_file_command "output-file" @keyword)
(compare_to_command "compare-to" @keyword)
; Variable references
(memory_reference "RAM" @type.builtin)
(register_reference) @variable.builtin
; Pin references
(pin_reference) @property
; Numbers and indices
(number) @constant.numeric
; Binary values
(binary_value) @constant.numeric
; Format specifications
(format_spec) @string.special
; Filenames
(filename) @string
; Strings
(string) @string
; Comments
(comment) @comment
; Punctuation
"," @punctuation.delimiter
";" @punctuation.delimiter
"[" @punctuation.bracket
"]" @punctuation.bracket
"{" @punctuation.bracket
"}" @punctuation.bracket
; Special memory references
"DRegister[]" @variable.builtin
"ARegister[]" @variable.builtin
"PC[]" @variable.builtin
; Conditions in while loops
(condition) @string.special