Better error reporting for unterminated strings.
This commit is contained in:
parent
4741ed8e14
commit
a023fd8591
|
@ -30,6 +30,7 @@ static int braces = 0;
|
||||||
yylval.string = strdup(yytext);
|
yylval.string = strdup(yytext);
|
||||||
return QFRAGMENT;
|
return QFRAGMENT;
|
||||||
}
|
}
|
||||||
|
<QSTRING>. yyerror("bad string input '%s' at line %d\n", yytext, yylineno);
|
||||||
|
|
||||||
<INITIAL>"/*" BEGIN(COMMENT);
|
<INITIAL>"/*" BEGIN(COMMENT);
|
||||||
<COMMENT>"*/" BEGIN(INITIAL);
|
<COMMENT>"*/" BEGIN(INITIAL);
|
||||||
|
|
Loading…
Reference in a new issue