Fixes: Parsing of #import directives.

This commit is contained in:
Roberto Raggi
2009-02-05 13:00:50 +01:00
committed by Roberto Raggi
parent c00e30187c
commit 4ffed7a119
2 changed files with 4 additions and 0 deletions

View File

@@ -727,6 +727,7 @@ void Preprocessor::processDirective(TokenIterator firstToken, TokenIterator last
case PP_INCLUDE:
case PP_INCLUDE_NEXT:
case PP_IMPORT:
if (! skipping())
processInclude(d == PP_INCLUDE_NEXT, firstToken, lastToken);
break;
@@ -1069,6 +1070,8 @@ Preprocessor::PP_DIRECTIVE_TYPE Preprocessor::classifyDirective (const QByteArra
case 6:
if (__directive[0] == 'i' && __directive == "ifndef")
return PP_IFNDEF;
else if (__directive[0] == 'i' && __directive == "import")
return PP_IMPORT;
else if (__directive[0] == 'd' && __directive == "define")
return PP_DEFINE;
break;

View File

@@ -150,6 +150,7 @@ namespace CPlusPlus {
{
PP_UNKNOWN_DIRECTIVE,
PP_DEFINE,
PP_IMPORT,
PP_INCLUDE,
PP_INCLUDE_NEXT,
PP_ELIF,