mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-15 16:11:25 +00:00
Fix parser to ignore comments inside strings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38186 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8a9d120d5c
commit
c900c7c4ce
2 changed files with 18 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-11-20 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Modules/Parsers/ProjectCenter/ObjCCommentHandler.m
|
||||
Fix parser to ignore comments inside strings.
|
||||
|
||||
2014-10-07 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Framework/PCProjectManager.m
|
||||
|
|
|
@ -47,17 +47,20 @@
|
|||
|
||||
- (void)symbol:(unichar)element
|
||||
{
|
||||
if (_preChar == '/')
|
||||
if (!_stringBegin)
|
||||
{
|
||||
if (element == '*')
|
||||
_commentType = MultipleLineComment;
|
||||
else if (element == '/')
|
||||
_commentType = SingleLineComment;
|
||||
|
||||
}
|
||||
else if ((element == '/') && (_preChar == '*'))
|
||||
{
|
||||
_commentType = NoComment;
|
||||
if (_preChar == '/')
|
||||
{
|
||||
if (element == '*')
|
||||
_commentType = MultipleLineComment;
|
||||
else if (element == '/')
|
||||
_commentType = SingleLineComment;
|
||||
|
||||
}
|
||||
else if ((element == '/') && (_preChar == '*'))
|
||||
{
|
||||
_commentType = NoComment;
|
||||
}
|
||||
}
|
||||
|
||||
if (_commentType == NoComment)
|
||||
|
|
Loading…
Reference in a new issue