Skip to content

chore(verilog): bump tree-sitter-systemverilog grammar to v0.5.0 - #1

Open
lwflwf1 wants to merge 1 commit into
danusha2345:feat/hdl-verilog-semanticsfrom
lwflwf1:sv-bump-grammar-0.5.0
Open

lwflwf1 wants to merge 1 commit into
danusha2345:feat/hdl-verilog-semanticsfrom
lwflwf1:sv-bump-grammar-0.5.0

Conversation

@lwflwf1

@lwflwf1 lwflwf1 commented Nov 22, 2026 •

Copy link
Copy Markdown

Scoped grammar bump + compatibility tests for colbymchenry#1875.

  • WASM: gmlarumbe/tree-sitter-systemverilog v0.5.0 release asset tree-sitter-systemverilog.wasm, sha256 bdd8246dd326e174ec7904f391e472d9a8d5212b2e3eee9c8ec6f692dbdb0920.

colbymchenry#85 bit-selected port connection

Before (v0.4.0): u1 could be parsed as udp_instantiation.

f u1(.in(in_bus[i]), .out(out_bus[i]));

After (v0.5.0): parses as module_instantiation; CodeGraph keeps u1 instantiating f and binds ports to base signals in_bus, out_bus.

colbymchenry#86 part-select range AST

Before (v0.4.0): part-select range nested under bit_select.

assign x = a[i][3:0];

After (v0.5.0): select children are [bit_select, constant_range]; signal refs include base/index signals a, i, x.

colbymchenry#80 :: static calls require parens

Before (v0.4.0): no-paren Class::member could be parsed as a zero-arg method_call.

y = pkg::method();
y = pkg::member;

After (v0.5.0): pkg::method() keeps a call edge; pkg::member has no method_call node and no pkg::member call edge.

Compatibility note: malformed procedural syntax recovered as module-level ERROR nodes no longer emits signal bindings from that ERROR region, avoiding invented outer-scope bindings.

Validation: npx tsc --noEmit; npx vitest run __tests__/verilog-*.test.ts __tests__/hdl-*.test.ts (35 files, 240 passed).

Update the vendored SystemVerilog grammar WASM to gmlarumbe/tree-sitter-systemverilog v0.5.0.

- Source: https://github.com/gmlarumbe/tree-sitter-systemverilog/releases/tag/v0.5.0
- Asset: tree-sitter-systemverilog.wasm
- SHA256: bdd8246dd326e174ec7904f391e472d9a8d5212b2e3eee9c8ec6f692dbdb0920

Add compatibility regressions for v0.5.0 AST changes: colbymchenry#85 bit-selected port
connections remain module instantiations and keep base-signal bindings; colbymchenry#86
part-select ranges remain select siblings with base/index signal refs; colbymchenry#80
static package method calls keep call edges while no-paren members are not
method calls.

Guard recovered ERROR nodes so malformed syntax does not invent outer-scope
signal bindings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant