Merge pull request #993 from ithinuel/escape-in-attribute

add double quote escapes from pragma comments.
This commit is contained in:
Cary R 2023-09-03 21:14:10 -07:00 committed by GitHub
commit d938654c36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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