Don't forget to BEGIN(INITIAL) when terminating a string

This commit is contained in:
Josh Holtrop 2018-04-07 09:31:10 -04:00
parent aaf47bf934
commit 49e4e853be

View File

@ -109,7 +109,10 @@ sizeof return TOK_SIZEOF;
BEGIN(str);
}
<str>{
\" return TOK_STR_CONST;
\" {
BEGIN(INITIAL);
return TOK_STR_CONST;
}
\\x[0-9A-Fa-f]{2} {
/* hexadecimal escape code */
unsigned int val;