Fix garbage line number and empty file name reporting for some '}' or ')' error messages

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13976 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-12-16 13:56:50 +00:00
commit 093dc60d2d
6 changed files with 32 additions and 2 deletions

View file

@ -65,6 +65,7 @@ Scanner *NewScanner(void) {
s->text = NewStringEmpty();
s->str = 0;
s->error = 0;
s->error_line = 0;
s->freeze_line = 0;
return s;
}
@ -104,6 +105,12 @@ void Scanner_clear(Scanner * s) {
s->nexttoken = -1;
s->start_line = 0;
s->yylen = 0;
/* Should these be cleared too?
s->idstart;
s->file;
s->error_line;
s->freeze_line;
*/
}
/* -----------------------------------------------------------------------------