Force last action on parser if file lacks a new line at EOF

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38189 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2014-11-20 09:44:42 +00:00
parent c900c7c4ce
commit 37fbd2d382
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2014-11-20 Riccardo Mottola <rm@gnu.org>
* Modules/Parsers/ProjectCenter/PCParser.m
Force last action on parser if file lacks a new line at EOF.
2014-11-20 Riccardo Mottola <rm@gnu.org>
* Modules/Parsers/ProjectCenter/ObjCCommentHandler.m

View file

@ -210,6 +210,10 @@ CodeType codeType(unichar *ch)
}
}
}
/* send an extra new line if the file did not terminate with such.
Forces the parser to close pending actions */
if (codeType(_uchar+_length) != SpaceAndNewLineCodeType)
(*impSpaceAndNewLine)(_handler, selSpaceAndNewLine, 0X0A);
}
@end