Better error reporting for unterminated strings.
authorDavid Given <dg@cowlark.com>
Sun, 2 Sep 2018 16:55:44 +0000 (18:55 +0200)
committerDavid Given <dg@cowlark.com>
Sun, 2 Sep 2018 16:55:44 +0000 (18:55 +0200)
util/mcgg/scan.l

index 447a7d3..9d06d5b 100644 (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);