summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qmljsast_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/parser/qmljsast_p.h')
-rw-r--r--src/declarative/qml/parser/qmljsast_p.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/declarative/qml/parser/qmljsast_p.h b/src/declarative/qml/parser/qmljsast_p.h
index 9745153..ee2f472 100644
--- a/src/declarative/qml/parser/qmljsast_p.h
+++ b/src/declarative/qml/parser/qmljsast_p.h
@@ -2291,6 +2291,12 @@ public:
: fileName(0), importUri(uri), importId(0)
{ kind = K; }
+ virtual SourceLocation firstSourceLocation() const
+ { return importToken; }
+
+ virtual SourceLocation lastSourceLocation() const
+ { return semicolonToken; }
+
virtual void accept0(Visitor *visitor);
// attributes
@@ -2323,6 +2329,21 @@ public:
previous->next = this;
}
+ virtual SourceLocation firstSourceLocation() const
+ {
+ if (import) return import->firstSourceLocation();
+ else return SourceLocation();
+ }
+
+ virtual SourceLocation lastSourceLocation() const
+ {
+ for (const UiImportList *it = this; it; it = it->next)
+ if (!it->next && it->import)
+ return it->import->lastSourceLocation();
+
+ return SourceLocation();
+ }
+
UiImportList *finish()
{
UiImportList *head = next;