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

30 lines
768 B
Plaintext

// Test HDL file for syntax highlighting
/**
* Example chip demonstrating various HDL syntax patterns
*/
CHIP TestChip {
IN in[16], // 16-bit input
load, // control signal
address[3]; // 3-bit address
OUT out[16], // 16-bit output
ready; // status signal
PARTS:
// Built-in chip reference
BUILTIN ALU;
// Clocked body
CLOCKED DFF, Register;
// Part instantiation with connections
Mux16(a=in, b=out, sel=load, out=muxOut);
// Register with bus connections
Register(in=muxOut, load=load, out=out);
// Complex connection
ALU(x=in, y=out, zx=load, nx=false, zy=true, ny=false,
f=true, no=false, out=aluOut, zr=zero, ng=negative);
}