Files
nand2tetris-zed/examples/EnhancedHDL.hdl
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

34 lines
726 B
Plaintext

/**
* 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]);
}