mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 21:27:00 +00:00
verilog: fix handling of nested ifdef directives
- track depth so we know whether to consider higher-level elsifs - error on unmatched endif/elsif/else
This commit is contained in:
parent
b6904a8e53
commit
1ec5994100
8 changed files with 197 additions and 11 deletions
6
tests/verilog/unmatched_else.ys
Normal file
6
tests/verilog/unmatched_else.ys
Normal file
|
@ -0,0 +1,6 @@
|
|||
logger -expect error "Found `else outside of macro conditional branch!" 1
|
||||
read_verilog <<EOT
|
||||
module top;
|
||||
`else
|
||||
endmodule
|
||||
EOT
|
Loading…
Add table
Add a link
Reference in a new issue