Files
nand2tetris-zed/languages/hack-assembly/outline.scm
Sean O'Connor c231dbfd27 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
2025-09-11 11:24:24 -04:00

22 lines
578 B
Scheme

; 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")