Changeset View
Changeset View
Standalone View
Standalone View
duchain/builders/declarationbuilder.cpp
Show First 20 Lines • Show All 1107 Lines • ▼ Show 20 Line(s) | 1088 | if (!m_isInternalFunctions) { | |||
---|---|---|---|---|---|
1108 | 1108 | | |||
1109 | m_currentFunctionType = oldFunction; | 1109 | m_currentFunctionType = oldFunction; | ||
1110 | } else { | 1110 | } else { | ||
1111 | // optimize for internal function file | 1111 | // optimize for internal function file | ||
1112 | DeclarationBuilderBase::visitFunctionCall(node); | 1112 | DeclarationBuilderBase::visitFunctionCall(node); | ||
1113 | } | 1113 | } | ||
1114 | 1114 | | |||
1115 | if (node->stringFunctionNameOrClass && !node->stringFunctionName && !node->varFunctionName) { | 1115 | if (node->stringFunctionNameOrClass && !node->stringFunctionName && !node->varFunctionName) { | ||
1116 | if (id.toString(true) == QLatin1String("define") | 1116 | if (id.toString(RemoveExplicitlyGlobalPrefix) == QLatin1String("define") | ||
1117 | && node->stringParameterList && node->stringParameterList->parametersSequence | 1117 | && node->stringParameterList && node->stringParameterList->parametersSequence | ||
1118 | && node->stringParameterList->parametersSequence->count() > 0) { | 1118 | && node->stringParameterList->parametersSequence->count() > 0) { | ||
1119 | //constant, defined through define-function | 1119 | //constant, defined through define-function | ||
1120 | 1120 | | |||
1121 | //find name of the constant (first argument of the function call) | 1121 | //find name of the constant (first argument of the function call) | ||
1122 | CommonScalarAst* scalar = findCommonScalar(node->stringParameterList->parametersSequence->at(0)->element); | 1122 | CommonScalarAst* scalar = findCommonScalar(node->stringParameterList->parametersSequence->at(0)->element); | ||
1123 | if (scalar && scalar->string != -1) { | 1123 | if (scalar && scalar->string != -1) { | ||
1124 | QString constant = m_editor->parseSession()->symbol(scalar->string); | 1124 | QString constant = m_editor->parseSession()->symbol(scalar->string); | ||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |