Fix line numbers in error and warning messages which were accumulately one less than they should have been after parsing each %include/%import - bug introduced in swig-1.3.32. Also fix line numbers in error and warning messages when new line characters appear between the %include / %import statement and the filename.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12199 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-09-03 06:03:48 +00:00
commit a44f83cf05
3 changed files with 19 additions and 8 deletions

View file

@ -2121,7 +2121,7 @@ include_directive: includetype options string LBRACKET {
} interface RBRACKET {
String *mname = 0;
$$ = $6;
scanner_set_location($1.filename,$1.line);
scanner_set_location($1.filename,$1.line+1);
if (strcmp($1.type,"include") == 0) set_nodeType($$,"include");
if (strcmp($1.type,"import") == 0) {
mname = $2 ? Getattr($2,"module") : 0;