forked from qt-creator/qt-creator
Fixes: Parsing of #import directives.
This commit is contained in:
committed by
Roberto Raggi
parent
c00e30187c
commit
4ffed7a119
@@ -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;
|
||||
|
||||
@@ -150,6 +150,7 @@ namespace CPlusPlus {
|
||||
{
|
||||
PP_UNKNOWN_DIRECTIVE,
|
||||
PP_DEFINE,
|
||||
PP_IMPORT,
|
||||
PP_INCLUDE,
|
||||
PP_INCLUDE_NEXT,
|
||||
PP_ELIF,
|
||||
|
||||
Reference in New Issue
Block a user