aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@qt.io>2020-02-11 16:13:36 +0100
committerFawzi Mohamed <fawzi.mohamed@qt.io>2020-02-12 18:28:46 +0100
commit41e8f8a7c6aa4a530abdbc52f8014c4563e85417 (patch)
tree35eca52953b51fedaeb3c16af695287c48eedc17 /tests/auto
parentc2e756dc1962eeb3575f618b38272359d4fccc89 (diff)
Add UiAnnotation for annotation objects
This is a partial patch that is fuilly fixed with the following one (big restructure) because it needs extra visit methods, and that leads to conflicts, but I think it gets lost if merged with the next one. Change-Id: I54331a47a5c7faaf78a97e580825d1feec5adf92 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/shared/qqmljsastdumper.cpp7
-rw-r--r--tests/auto/shared/qqmljsastdumper.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/shared/qqmljsastdumper.cpp b/tests/auto/shared/qqmljsastdumper.cpp
index 92d95be80a..8a50e021f6 100644
--- a/tests/auto/shared/qqmljsastdumper.cpp
+++ b/tests/auto/shared/qqmljsastdumper.cpp
@@ -366,6 +366,12 @@ bool AstDumper::visit(UiRequired *el)
return true;
}
+bool AstDumper::visit(UiAnnotation *)
+{
+ start(QLatin1String("UiAnnotation"));
+ return true;
+}
+
bool AstDumper::visit(UiAnnotationList *)
{
start(QLatin1String("UiAnnotationList"));
@@ -409,6 +415,7 @@ void AstDumper::endVisit(AST::UiEnumMemberList *el) {
void AstDumper::endVisit(AST::UiVersionSpecifier *) { stop("UiVersionSpecifier"); }
void AstDumper::endVisit(AST::UiInlineComponent *) { stop("UiInlineComponent"); }
void AstDumper::endVisit(UiRequired *) { stop("UiRequired"); }
+void AstDumper::endVisit(UiAnnotation *) { stop("UiAnnotation"); }
void AstDumper::endVisit(UiAnnotationList *) { stop("UiAnnotationList"); }
// QQmlJS
diff --git a/tests/auto/shared/qqmljsastdumper.h b/tests/auto/shared/qqmljsastdumper.h
index cd52e96220..d8d19e351d 100644
--- a/tests/auto/shared/qqmljsastdumper.h
+++ b/tests/auto/shared/qqmljsastdumper.h
@@ -119,6 +119,8 @@ public:
bool visit(AST::UiVersionSpecifier *) override;
bool visit(AST::UiInlineComponent *) override;
bool visit(AST::UiRequired *) override;
+ bool visit(AST::UiAnnotation *) override;
+ bool visit(AST::UiAnnotationList *) override;
void endVisit(AST::UiProgram *) override;
void endVisit(AST::UiImport *) override;
@@ -140,6 +142,8 @@ public:
void endVisit(AST::UiVersionSpecifier *) override;
void endVisit(AST::UiInlineComponent *) override;
void endVisit(AST::UiRequired *) override;
+ void endVisit(AST::UiAnnotation *) override;
+ void endVisit(AST::UiAnnotationList *) override;
// QQmlJS
bool visit(AST::ThisExpression *) override;