Skip to content
Snippets Groups Projects
Commit ffee7c0b authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Clean up ScopeAstPath visitor.

Change-Id: If983e9c9bee2d0396d7cc00973ee3885a3736d8a
Reviewed-on: http://codereview.qt.nokia.com/2767


Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@nokia.com>
parent 795d4506
No related branches found
No related tags found
No related merge requests found
......@@ -47,12 +47,14 @@ QList<Node *> ScopeAstPath::operator()(quint32 offset)
_result.clear();
_offset = offset;
if (_doc)
Node::accept(_doc->ast(), this);
accept(_doc->ast());
return _result;
}
void ScopeAstPath::accept(Node *node)
{ Node::acceptChild(node, this); }
{
Node::accept(node, this);
}
bool ScopeAstPath::preVisit(Node *node)
{
......@@ -72,7 +74,7 @@ bool ScopeAstPath::visit(UiPublicMember *node)
&& containsOffset(node->statement->firstSourceLocation(),
node->statement->lastSourceLocation())) {
_result.append(node);
Node::accept(node->statement, this);
accept(node->statement);
return false;
}
return true;
......@@ -85,7 +87,7 @@ bool ScopeAstPath::visit(UiScriptBinding *node)
node->statement->lastSourceLocation()))
{
_result.append(node);
Node::accept(node->statement, this);
accept(node->statement);
return false;
}
return true;
......@@ -94,14 +96,14 @@ bool ScopeAstPath::visit(UiScriptBinding *node)
bool ScopeAstPath::visit(UiObjectDefinition *node)
{
_result.append(node);
Node::accept(node->initializer, this);
accept(node->initializer);
return false;
}
bool ScopeAstPath::visit(UiObjectBinding *node)
{
_result.append(node);
Node::accept(node->initializer, this);
accept(node->initializer);
return false;
}
......@@ -112,9 +114,9 @@ bool ScopeAstPath::visit(FunctionDeclaration *node)
bool ScopeAstPath::visit(FunctionExpression *node)
{
Node::accept(node->formals, this);
accept(node->formals);
_result.append(node);
Node::accept(node->body, this);
accept(node->body);
return false;
}
......
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