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:
29
test-hdl.hdl
Normal file
29
test-hdl.hdl
Normal file
@@ -0,0 +1,29 @@
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user