add double quote escapes from pragma comments.

This commit is contained in:
Wilfried Chauveau 2023-08-10 21:10:23 +01:00
parent 77f7609b67
commit 873c2fecd4
No known key found for this signature in database
GPG Key ID: 0BC4C0B2B0879D6A
2 changed files with 5 additions and 0 deletions

View File

@ -268,6 +268,7 @@ keywords (line|include|define|undef|ifdef|ifndef|else|elsif|endif)
<PCOMENT>`[a-zA-Z][a-zA-Z0-9_$]* {
if (macro_needs_args(yytext+1)) yy_push_state(MA_START); else do_expand(0);
}
<PCOMENT>`\" { fputc('\"', yyout); }
/* Strings do not contain preprocessor directives or macro expansions.
*/

View File

@ -74,6 +74,10 @@ endfunction
(* attr = fn(10) *) reg attr46;
// Macro escaped
`define A_MACRO(arg) (* attr = `"arg`" *)
`A_MACRO(test) reg attr47;
initial begin
$display("PASSED");
end