Store in the document's macroUsages only the top-level macro expansions.

This commit is contained in:
Roberto Raggi
2009-10-15 16:24:15 +02:00
parent 48e7f20d86
commit f829ef899c
4 changed files with 10 additions and 22 deletions

View File

@@ -287,9 +287,6 @@ const char *MacroExpander::expand(const char *__first, const char *__last,
if (! macro->definition().isEmpty())
{
if (client)
client->startExpandingMacro(start_offset + (name_begin-start), *macro, fast_name, true);
macro->setHidden(true);
QByteArray __tmp;
@@ -316,9 +313,6 @@ const char *MacroExpander::expand(const char *__first, const char *__last,
}
macro->setHidden(false);
if (client)
client->stopExpandingMacro(start_offset + (name_begin-start), *macro);
}
if (! m)
@@ -375,17 +369,11 @@ const char *MacroExpander::expand(const char *__first, const char *__last,
++arg_it; // skip ')'
__first = arg_it;
if (client)
client->startExpandingMacro(start_offset + (name_begin-start), *macro, fast_name, true, actuals_ref);
pp_frame frame (macro, actuals);
MacroExpander expand_macro (env, &frame);
macro->setHidden(true);
expand_macro (macro->definition(), __result);
macro->setHidden(false);
if (client)
client->stopExpandingMacro(start_offset + (name_begin-start), *macro);
}
else
__result->append(*__first++);