QmlJS: Update to new QmlJS parser.

UiPublicMember is now initialized with a statement.
This commit is contained in:
Christian Kamm
2011-05-12 13:25:35 +02:00
parent f8bcd6c615
commit d72bddc7da
30 changed files with 1171 additions and 1080 deletions

View File

@@ -3276,7 +3276,7 @@ bool ASTPropertyReference::getSourceLocation(QString *fileName, int *line, int *
const Value *ASTPropertyReference::value(const Context *context) const
{
if (_ast->expression
if (_ast->statement
&& (!_ast->memberType || _ast->memberType->asString() == QLatin1String("variant")
|| _ast->memberType->asString() == QLatin1String("alias"))) {
@@ -3288,11 +3288,11 @@ const Value *ASTPropertyReference::value(const Context *context) const
QmlJS::ScopeBuilder builder(&localContext, doc);
builder.initializeRootScope();
int offset = _ast->expression->firstSourceLocation().begin();
int offset = _ast->statement->firstSourceLocation().begin();
builder.push(ScopeAstPath(doc)(offset));
Evaluate check(&localContext);
return check(_ast->expression);
return check(_ast->statement);
}
if (_ast->memberType)