From 9fdeef7b5a1018872c7f07b8d03e374a3da840a0 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 16 Mar 2019 20:06:02 +0100 Subject: at sign (`@`) not handled correctly in preprocessor --- src/pre.l | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/pre.l b/src/pre.l index 1e45ca3..82c050c 100644 --- a/src/pre.l +++ b/src/pre.l @@ -1180,6 +1180,20 @@ QCString removeIdsAndMarkers(const char *s) p++; inNum=TRUE; } + else if (c=='\'') // quoted character + { + result+=c; + p++; + char pc=c; + while ((c=*p) && (c!='\'' || pc=='\\')) + { + result+=c; + pc=c; + p++; + } + result+=c; + p++; + } else if (c=='d' && !inNum) // identifier starting with a `d' { if (qstrncmp(p,"defined ",8)==0 || qstrncmp(p,"defined(",8)==0) @@ -2185,6 +2199,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN(DefinedExpr1); } {ID} { g_guardExpr+=yytext; } +"@" { g_guardExpr+="@@"; } . { g_guardExpr+=*yytext; } \n { unput(*yytext); -- cgit v0.12