Improve errors for missing ; and unexpected )

This commit is contained in:
Olly Betts 2015-01-08 15:27:57 +13:00
commit 62670e756e
4 changed files with 13 additions and 8 deletions

View file

@ -3024,6 +3024,15 @@ c_decl_tail : SEMI {
skip_balanced('{','}');
$$ = 0;
}
| error {
$$ = 0;
if (yychar == RPAREN) {
Swig_error(cparse_file, cparse_line, "Unexpected ')'.\n");
} else {
Swig_error(cparse_file, cparse_line, "Syntax error - missing ';'?\n");
}
exit(1);
}
;
initializer : def_args {