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:
33
examples/EnhancedHDL.hdl
Normal file
33
examples/EnhancedHDL.hdl
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Enhanced HDL Test File
|
||||
* Demonstrates all the new highlighting features
|
||||
*/
|
||||
|
||||
CHIP EnhancedTest {
|
||||
// Array notation support
|
||||
IN a[16], b[8], c;
|
||||
OUT out[16], flag, result[4];
|
||||
|
||||
PARTS:
|
||||
// Boolean literals in connections
|
||||
Mux16(a=a, b=false, sel=c, out=temp);
|
||||
|
||||
// Bit range operations
|
||||
Add16(a=a[0..7], b=b, out=out[0..7]);
|
||||
Add16(a=a[8..15], b=false, out=out[8..15]);
|
||||
|
||||
// Complex array operations
|
||||
Not16(in=a, out=notA);
|
||||
And16(a=notA, b=true, out=result);
|
||||
|
||||
// Single bit operations
|
||||
And(a=a[0], b=b[0], out=flag);
|
||||
|
||||
// Mixed operations with ranges
|
||||
Mux4Way16(a=a[0..3], b=a[4..7], c=a[8..11], d=a[12..15],
|
||||
sel=c, out=out[0..3]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user