From 63064c7ed7a23c1749ed7f58d55b680190dc01c4 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 3 Jan 2013 17:13:38 +0100 Subject: [PATCH] Add the getter/setter type to PropertyGetterSetter Required to differentiatate between getters and setters. Change-Id: I48b2fb911192a8cc5840ff11e31b885f62ac6179 Reviewed-by: Simon Hausmann --- src/qml/qml/parser/qqmljsast_p.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/qml/qml/parser/qqmljsast_p.h b/src/qml/qml/parser/qqmljsast_p.h index ddab613..261067d 100644 --- a/src/qml/qml/parser/qqmljsast_p.h +++ b/src/qml/qml/parser/qqmljsast_p.h @@ -679,12 +679,17 @@ class QML_PARSER_EXPORT PropertyGetterSetter: public PropertyAssignment public: QQMLJS_DECLARE_AST_NODE(PropertyGetterSetter) + enum Type { + Getter, + Setter + }; + PropertyGetterSetter(PropertyName *n, FunctionBody *b) - : name(n), formals(0), functionBody (b) + : type(Getter), name(n), formals(0), functionBody (b) { kind = K; } PropertyGetterSetter(PropertyName *n, FormalParameterList *f, FunctionBody *b) - : name(n), formals(f), functionBody (b) + : type(Setter), name(n), formals(f), functionBody (b) { kind = K; } virtual void accept0(Visitor *visitor); @@ -696,6 +701,7 @@ public: { return rbraceToken; } // attributes + Type type; SourceLocation getSetToken; PropertyName *name; SourceLocation lparenToken; -- 2.7.4