Commit 0d40f8a9 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Added macro protection.

parent 0fcb8131
...@@ -585,15 +585,19 @@ void pp::operator()(const QByteArray &source, QByteArray *result) ...@@ -585,15 +585,19 @@ void pp::operator()(const QByteArray &source, QByteArray *result)
} else { } else {
if (! m->function_like) { if (! m->function_like) {
if (_dot->isNot(T_LPAREN)) { if (_dot->isNot(T_LPAREN)) {
m->hidden = true;
expand(m->definition.constBegin(), expand(m->definition.constBegin(),
m->definition.constEnd(), m->definition.constEnd(),
result); result);
m->hidden = false;
continue; continue;
} else { } else {
QByteArray tmp; QByteArray tmp;
m->hidden = true;
expand(m->definition.constBegin(), expand(m->definition.constBegin(),
m->definition.constEnd(), m->definition.constEnd(),
&tmp); &tmp);
m->hidden = false;
m = 0; // reset the active the macro m = 0; // reset the active the macro
...@@ -636,7 +640,9 @@ void pp::operator()(const QByteArray &source, QByteArray *result) ...@@ -636,7 +640,9 @@ void pp::operator()(const QByteArray &source, QByteArray *result)
const char *beginOfText = startOfToken(*identifierToken); const char *beginOfText = startOfToken(*identifierToken);
const char *endOfText = endOfToken(*_dot); const char *endOfText = endOfToken(*_dot);
++_dot; // skip T_RPAREN ++_dot; // skip T_RPAREN
m->hidden = true;
expand(beginOfText, endOfText, result); expand(beginOfText, endOfText, result);
m->hidden = false;
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment