Better error reporting for unterminated strings.

This commit is contained in:
David Given 2018-09-02 18:55:44 +02:00
parent 4741ed8e14
commit a023fd8591

View file

@ -30,6 +30,7 @@ static int braces = 0;
yylval.string = strdup(yytext);
return QFRAGMENT;
}
<QSTRING>. yyerror("bad string input '%s' at line %d\n", yytext, yylineno);
<INITIAL>"/*" BEGIN(COMMENT);
<COMMENT>"*/" BEGIN(INITIAL);