diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2020-02-27 10:49:14 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2020-03-02 10:35:50 +0100 |
commit | 8ab237edf170f5b0482dccf5169868e5c7c47771 (patch) | |
tree | cca2d3faa0a8553a452d9139ac7442c3da25c0f8 /src/qml/compiler/qv4compilercontext_p.h | |
parent | d8f6f41c334d14c4712b1dc16554f80bb1290e24 (diff) |
Restore offset/length in QQmlJS::DiagnosticMessage
This is needed in a few places outside of declarative, so this change
restores the loc member in DiagnosticMessage and moves
QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory.
QQmlError is unaffected and retains only line/column.
Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb
Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilercontext_p.h')
-rw-r--r-- | src/qml/compiler/qv4compilercontext_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h index 8c124ac409..4a14009c35 100644 --- a/src/qml/compiler/qv4compilercontext_p.h +++ b/src/qml/compiler/qv4compilercontext_p.h @@ -183,10 +183,10 @@ struct Context { QQmlJS::AST::VariableScope scope = QQmlJS::AST::VariableScope::Var; mutable bool canEscape = false; QQmlJS::AST::FunctionExpression *function = nullptr; - QQmlJS::AST::SourceLocation endOfInitializerLocation; + QQmlJS::SourceLocation endOfInitializerLocation; bool isLexicallyScoped() const { return this->scope != QQmlJS::AST::VariableScope::Var; } - bool requiresTDZCheck(const QQmlJS::AST::SourceLocation &accessLocation, bool accessAcrossContextBoundaries) const; + bool requiresTDZCheck(const QQmlJS::SourceLocation &accessLocation, bool accessAcrossContextBoundaries) const; }; typedef QMap<QString, Member> MemberMap; @@ -227,7 +227,7 @@ struct Context { bool isWithBlock = false; bool isCatchBlock = false; QString caughtVariable; - QQmlJS::AST::SourceLocation lastBlockInitializerLocation; + QQmlJS::SourceLocation lastBlockInitializerLocation; enum UsesArgumentsObject { ArgumentsObjectUnknown, @@ -331,7 +331,7 @@ struct Context { } bool addLocalVar(const QString &name, MemberType contextType, QQmlJS::AST::VariableScope scope, QQmlJS::AST::FunctionExpression *function = nullptr, - const QQmlJS::AST::SourceLocation &endOfInitializer = QQmlJS::AST::SourceLocation()); + const QQmlJS::SourceLocation &endOfInitializer = QQmlJS::SourceLocation()); struct ResolvedName { enum Type { @@ -348,10 +348,10 @@ struct Context { bool requiresTDZCheck = false; int scope = -1; int index = -1; - QQmlJS::AST::SourceLocation endOfDeclarationLocation; + QQmlJS::SourceLocation endOfDeclarationLocation; bool isValid() const { return type != Unresolved; } }; - ResolvedName resolveName(const QString &name, const QQmlJS::AST::SourceLocation &accessLocation); + ResolvedName resolveName(const QString &name, const QQmlJS::SourceLocation &accessLocation); void emitBlockHeader(Compiler::Codegen *codegen); void emitBlockFooter(Compiler::Codegen *codegen); |