Improve errors for missing ; and unexpected )
This commit is contained in:
parent
d315187a1c
commit
62670e756e
4 changed files with 13 additions and 8 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue