aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-01-03 17:13:38 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-04 06:53:31 +0100
commit63064c7ed7a23c1749ed7f58d55b680190dc01c4 (patch)
tree56e8e317c740706608069db558a5e858e79af6cd
parentac9aa6bf4b46d39273df12e8b8a1f6c5df3a899d (diff)
Add the getter/setter type to PropertyGetterSetter
Required to differentiatate between getters and setters. Change-Id: I48b2fb911192a8cc5840ff11e31b885f62ac6179 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/qml/qml/parser/qqmljsast_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/qml/parser/qqmljsast_p.h b/src/qml/qml/parser/qqmljsast_p.h
index ddab613408..261067d6b1 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;