mirror of https://github.com/zachjs/sv2v.git
skip start of block before looking for its end
This commit is contained in:
parent
4ce177c074
commit
eca8714de7
|
|
@ -8,6 +8,9 @@
|
|||
static prefixes, which could cause deep recursion and run out of memory on
|
||||
some designs
|
||||
* Fixed unneeded scoping of constant function calls used in type lookups
|
||||
* `/*/` is no longer interpreted as a self-closing block comment, e.g.,
|
||||
`$display("a"/*/,"b"/* */);` previously printed "ab", but now prints "a"
|
||||
|
||||
|
||||
### New Features
|
||||
|
||||
|
|
|
|||
|
|
@ -545,7 +545,10 @@ preprocessInput = do
|
|||
macroStack <- getMacroStack
|
||||
case str of
|
||||
'/' : '/' : _ -> removeThrough "\n"
|
||||
'/' : '*' : _ -> removeThrough "*/"
|
||||
'/' : '*' : _ ->
|
||||
-- prevent treating `/*/` as self-closing
|
||||
takeChar >> takeChar >>
|
||||
removeThrough "*/"
|
||||
'`' : '"' : _ -> handleBacktickString
|
||||
'"' : _ -> handleString
|
||||
'/' : '`' : '`' : '*' : _ ->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
module top;
|
||||
/*test*/
|
||||
/*/test*/
|
||||
/*test/*/
|
||||
/*/test/*/
|
||||
initial $display("foo"/*/,"bar"/*/);
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module top;
|
||||
initial $display("foo");
|
||||
endmodule
|
||||
Loading…
Reference in New Issue