Open YikeZhou opened 1 year ago
Given this:
module top; wire a[1:0][1:0]; assign a[1][0] = 0; endmodule;
Run tree-sitter like this:
tree-sitter parse top.v
Got this error:
top.v 0 ms (ERROR [2, 10] - [2, 16])
However, a one-dimensional array works fine.
module top; wire a[1:0]; assign a[0] = 0; endmodule;
I guess the parser somehow failed to recognize [1][0] as constant_select1 here.
[1][0]
constant_select1
https://github.com/tree-sitter/tree-sitter-verilog/blob/902031343056bc0b11f3e47b33f036a9cf59f58d/grammar.js#L4381-L4388
Did you manage how to solve it? i am about to start working with verilog and i have noticed that problem as well.
Given this:
Run tree-sitter like this:
Got this error:
However, a one-dimensional array works fine.
I guess the parser somehow failed to recognize
[1][0]
asconstant_select1
here.https://github.com/tree-sitter/tree-sitter-verilog/blob/902031343056bc0b11f3e47b33f036a9cf59f58d/grammar.js#L4381-L4388