Commit eca8714d by Zachary Snow

skip start of block before looking for its end

parent 4ce177c0
......@@ -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
'/' : '`' : '`' : '*' : _ ->
......
module top;
/*test*/
/*/test*/
/*test/*/
/*/test/*/
initial $display("foo"/*/,"bar"/*/);
endmodule
module top;
initial $display("foo");
endmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment