Commit 1fd72d87 by Zachary Snow

fix double backtick handling in backtick string

parent bf6ba338
......@@ -630,6 +630,10 @@ handleBacktickString = do
if null macroStack
then lexicalError "`\\`\" is not allowed outside of macros"
else loop
'`' : '`' : _ -> do
'`' <- takeChar
'`' <- takeChar
loop
'`' : _ -> do
handleDirective True
loop
......
`define PRINT(str, num) $display(`"StrIs``str NumIs``num`");
module top;
initial begin
`PRINT(FOO, 0)
`PRINT(BAR, 1)
`PRINT(BAZ, 2)
`PRINT(A, 1)
`PRINT(B, 2)
`PRINT(C, 3)
end
endmodule
`include "macro_string.sv"
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