Permalink
Browse files

line continuation characters inside comments embedded in a macro defi…

…nition appeared in the output
  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Apr 2, 2017
1 parent 436fc7e commit 898b6044194d5967099adfadab454cd09a4f360e
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/pre.l
View
@@ -2658,10 +2658,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipCComment,SkipVerbatim>. {
outputChar(*yytext);
}
<CopyCComment>[^*a-z_A-Z\x80-\xFF\n]+ {
<CopyCComment>[^*a-z_A-Z\x80-\xFF\n]*[^*a-z_A-Z\x80-\xFF\\\n] {
g_defLitText+=yytext;
g_defText+=escapeAt(yytext);
}
}
<CopyCComment>\\[\r]?\n {
g_defLitText+=yytext;
outputChar('\n');
g_defText+=" ";
g_yyLineNr++;
g_yyMLines++;
}
<CopyCComment>"*/" {
g_defLitText+=yytext;
g_defText+=yytext;
@@ -2753,7 +2760,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defLitText+=yytext;
g_defText+=yytext;
}
<DefineText>\\[\r]?\n {
<DefineText>\\[\r]?\n {
g_defLitText+=yytext;
outputChar('\n');
g_defText += ' ';

0 comments on commit 898b604

Please sign in to comment.