summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pre.l b/src/pre.l
index eea1418..abcd9dd 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -381,6 +381,7 @@ struct preYY_state
bool skip;
QStack<CondCtx> condStack;
bool insideCS; // C# has simpler preprocessor
+ bool insideFtn;
bool isSource;
yy_size_t fenceSize = 0;
@@ -500,7 +501,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
name=name.left(name.find('(')).stripWhiteSpace();
Define *def=0;
- if (skipFuncMacros &&
+ if (skipFuncMacros && !yyextra->insideFtn &&
name!="Q_PROPERTY" &&
!(
(yyextra->includeStack.isEmpty() || yyextra->curlyCount>0) &&
@@ -1716,6 +1717,7 @@ static void setFileName(yyscan_t yyscanner,const char *name)
// name,state->yyFileName.data(),state->yyFileDef);
if (state->yyFileDef && state->yyFileDef->isReference()) state->yyFileDef=0;
state->insideCS = getLanguageFromFileName(state->yyFileName)==SrcLangExt_CSharp;
+ state->insideFtn = getLanguageFromFileName(state->yyFileName)==SrcLangExt_Fortran;
state->isSource = guessSection(state->yyFileName);
}