Skip to content
Snippets Groups Projects
Commit 4ffed7a1 authored by Roberto Raggi's avatar Roberto Raggi Committed by Roberto Raggi
Browse files

Fixes: Parsing of #import directives.

parent c00e3018
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment