mirror of
https://github.com/soconnor0919/nand2tetris-zed.git
synced 2025-12-15 08:34:44 -05:00
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:
21
languages/hack-assembly/outline.scm
Normal file
21
languages/hack-assembly/outline.scm
Normal file
@@ -0,0 +1,21 @@
|
||||
; Hack Assembly outline queries
|
||||
|
||||
; Show label declarations in the outline
|
||||
(label_declaration
|
||||
(symbol) @name) @item
|
||||
|
||||
; Show A-instructions with symbols as outline items
|
||||
(a_instruction
|
||||
(symbol) @name) @item
|
||||
|
||||
; Show A-instructions with constants as outline items
|
||||
(a_instruction
|
||||
(constant) @name) @item
|
||||
|
||||
; Show C-instructions with jumps as outline items (control flow)
|
||||
(c_instruction
|
||||
(jump) @name) @item
|
||||
|
||||
; Show comments that look like section headers
|
||||
(comment) @item
|
||||
(#match? @item "^//\\s*[A-Z].*|^//.*[Ss]ection|^//.*[Pp]art|^//.*[Ff]unction|^//.*[Ll]oop|^//.*[Ee]nd")
|
||||
Reference in New Issue
Block a user