Skip to content

Commit

Permalink
line continuation characters inside comments embedded in a macro defi…
Browse files Browse the repository at this point in the history
…nition appeared in the output
  • Loading branch information
Dimitri van Heesch committed Apr 2, 2017
1 parent 436fc7e commit 898b604
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/pre.l
Expand Up @@ -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;
Expand Down Expand Up @@ -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 += ' ';
Expand Down

0 comments on commit 898b604

Please sign in to comment.