diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-05 08:53:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-05 14:59:32 +0200 |
commit | 47c5a3e43e054292de468d4306b039143b3df636 (patch) | |
tree | 596c3e9416f5e57e1cc07687a6ed6cccf86425bf /src | |
parent | 7200da29a888567313fa67ea20bbdb82714ae218 (diff) |
QmlCompiler: Add a source location to QQmlJSScope
This will come in handy when matching scopes to IR objects.
Change-Id: Idff002378a27f08e7d53e8d462311156b0583a8e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qmlcompiler/qqmljsscope_p.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h index 0de0a58401..4cf1d4cd6c 100644 --- a/src/qmlcompiler/qqmljsscope_p.h +++ b/src/qmlcompiler/qqmljsscope_p.h @@ -193,6 +193,16 @@ public: void resolveTypes(const QHash<QString, ConstPtr> &contextualTypes); + void setSourceLocation(const QQmlJS::SourceLocation &sourceLocation) + { + m_sourceLocation = sourceLocation; + } + + QQmlJS::SourceLocation sourceLocation() const + { + return m_sourceLocation; + } + private: QQmlJSScope(ScopeType type, const QQmlJSScope::Ptr &parentScope = QQmlJSScope::Ptr()); @@ -219,6 +229,8 @@ private: Flags m_flags; AccessSemantics m_semantics = AccessSemantics::Reference; + + QQmlJS::SourceLocation m_sourceLocation; }; QT_END_NAMESPACE |