author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 19 Feb 2010 23:40:16 +0200 | |
branch | RCL_3 |
changeset 4 | 3b1da2848fc7 |
parent 3 | 41300fa6a67c |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtScript module of the Qt Toolkit. |
|
8 |
** |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
9 |
** $QT_BEGIN_LICENSE:LGPL-ONLY$ |
0 | 10 |
** GNU Lesser General Public License Usage |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
11 |
** This file may be used under the terms of the GNU Lesser |
0 | 12 |
** General Public License version 2.1 as published by the Free Software |
13 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
14 |
** packaging of this file. Please review the following information to |
|
15 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
16 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
17 |
** |
|
18 |
** If you have questions regarding the use of this file, please contact |
|
19 |
** Nokia at qt-info@nokia.com. |
|
20 |
** $QT_END_LICENSE$ |
|
21 |
** |
|
22 |
****************************************************************************/ |
|
23 |
||
24 |
#ifndef QSCRIPTASTVISITOR_P_H |
|
25 |
#define QSCRIPTASTVISITOR_P_H |
|
26 |
||
27 |
// |
|
28 |
// W A R N I N G |
|
29 |
// ------------- |
|
30 |
// |
|
31 |
// This file is not part of the Qt API. It exists purely as an |
|
32 |
// implementation detail. This header file may change from version to |
|
33 |
// version without notice, or even be removed. |
|
34 |
// |
|
35 |
// We mean it. |
|
36 |
// |
|
37 |
||
38 |
#include "qscriptastfwd_p.h" |
|
39 |
||
40 |
QT_BEGIN_NAMESPACE |
|
41 |
||
42 |
namespace QScript { namespace AST { |
|
43 |
||
44 |
class Visitor |
|
45 |
{ |
|
46 |
public: |
|
47 |
Visitor(); |
|
48 |
virtual ~Visitor(); |
|
49 |
||
50 |
virtual bool preVisit(Node *) { return true; } |
|
51 |
virtual void postVisit(Node *) {} |
|
52 |
||
53 |
virtual bool visit(ThisExpression *) { return true; } |
|
54 |
virtual void endVisit(ThisExpression *) {} |
|
55 |
||
56 |
virtual bool visit(IdentifierExpression *) { return true; } |
|
57 |
virtual void endVisit(IdentifierExpression *) {} |
|
58 |
||
59 |
virtual bool visit(NullExpression *) { return true; } |
|
60 |
virtual void endVisit(NullExpression *) {} |
|
61 |
||
62 |
virtual bool visit(TrueLiteral *) { return true; } |
|
63 |
virtual void endVisit(TrueLiteral *) {} |
|
64 |
||
65 |
virtual bool visit(FalseLiteral *) { return true; } |
|
66 |
virtual void endVisit(FalseLiteral *) {} |
|
67 |
||
68 |
virtual bool visit(StringLiteral *) { return true; } |
|
69 |
virtual void endVisit(StringLiteral *) {} |
|
70 |
||
71 |
virtual bool visit(NumericLiteral *) { return true; } |
|
72 |
virtual void endVisit(NumericLiteral *) {} |
|
73 |
||
74 |
virtual bool visit(RegExpLiteral *) { return true; } |
|
75 |
virtual void endVisit(RegExpLiteral *) {} |
|
76 |
||
77 |
virtual bool visit(ArrayLiteral *) { return true; } |
|
78 |
virtual void endVisit(ArrayLiteral *) {} |
|
79 |
||
80 |
virtual bool visit(ObjectLiteral *) { return true; } |
|
81 |
virtual void endVisit(ObjectLiteral *) {} |
|
82 |
||
83 |
virtual bool visit(ElementList *) { return true; } |
|
84 |
virtual void endVisit(ElementList *) {} |
|
85 |
||
86 |
virtual bool visit(Elision *) { return true; } |
|
87 |
virtual void endVisit(Elision *) {} |
|
88 |
||
89 |
virtual bool visit(PropertyNameAndValueList *) { return true; } |
|
90 |
virtual void endVisit(PropertyNameAndValueList *) {} |
|
91 |
||
92 |
virtual bool visit(IdentifierPropertyName *) { return true; } |
|
93 |
virtual void endVisit(IdentifierPropertyName *) {} |
|
94 |
||
95 |
virtual bool visit(StringLiteralPropertyName *) { return true; } |
|
96 |
virtual void endVisit(StringLiteralPropertyName *) {} |
|
97 |
||
98 |
virtual bool visit(NumericLiteralPropertyName *) { return true; } |
|
99 |
virtual void endVisit(NumericLiteralPropertyName *) {} |
|
100 |
||
101 |
virtual bool visit(ArrayMemberExpression *) { return true; } |
|
102 |
virtual void endVisit(ArrayMemberExpression *) {} |
|
103 |
||
104 |
virtual bool visit(FieldMemberExpression *) { return true; } |
|
105 |
virtual void endVisit(FieldMemberExpression *) {} |
|
106 |
||
107 |
virtual bool visit(NewMemberExpression *) { return true; } |
|
108 |
virtual void endVisit(NewMemberExpression *) {} |
|
109 |
||
110 |
virtual bool visit(NewExpression *) { return true; } |
|
111 |
virtual void endVisit(NewExpression *) {} |
|
112 |
||
113 |
virtual bool visit(CallExpression *) { return true; } |
|
114 |
virtual void endVisit(CallExpression *) {} |
|
115 |
||
116 |
virtual bool visit(ArgumentList *) { return true; } |
|
117 |
virtual void endVisit(ArgumentList *) {} |
|
118 |
||
119 |
virtual bool visit(PostIncrementExpression *) { return true; } |
|
120 |
virtual void endVisit(PostIncrementExpression *) {} |
|
121 |
||
122 |
virtual bool visit(PostDecrementExpression *) { return true; } |
|
123 |
virtual void endVisit(PostDecrementExpression *) {} |
|
124 |
||
125 |
virtual bool visit(DeleteExpression *) { return true; } |
|
126 |
virtual void endVisit(DeleteExpression *) {} |
|
127 |
||
128 |
virtual bool visit(VoidExpression *) { return true; } |
|
129 |
virtual void endVisit(VoidExpression *) {} |
|
130 |
||
131 |
virtual bool visit(TypeOfExpression *) { return true; } |
|
132 |
virtual void endVisit(TypeOfExpression *) {} |
|
133 |
||
134 |
virtual bool visit(PreIncrementExpression *) { return true; } |
|
135 |
virtual void endVisit(PreIncrementExpression *) {} |
|
136 |
||
137 |
virtual bool visit(PreDecrementExpression *) { return true; } |
|
138 |
virtual void endVisit(PreDecrementExpression *) {} |
|
139 |
||
140 |
virtual bool visit(UnaryPlusExpression *) { return true; } |
|
141 |
virtual void endVisit(UnaryPlusExpression *) {} |
|
142 |
||
143 |
virtual bool visit(UnaryMinusExpression *) { return true; } |
|
144 |
virtual void endVisit(UnaryMinusExpression *) {} |
|
145 |
||
146 |
virtual bool visit(TildeExpression *) { return true; } |
|
147 |
virtual void endVisit(TildeExpression *) {} |
|
148 |
||
149 |
virtual bool visit(NotExpression *) { return true; } |
|
150 |
virtual void endVisit(NotExpression *) {} |
|
151 |
||
152 |
virtual bool visit(BinaryExpression *) { return true; } |
|
153 |
virtual void endVisit(BinaryExpression *) {} |
|
154 |
||
155 |
virtual bool visit(ConditionalExpression *) { return true; } |
|
156 |
virtual void endVisit(ConditionalExpression *) {} |
|
157 |
||
158 |
virtual bool visit(Expression *) { return true; } |
|
159 |
virtual void endVisit(Expression *) {} |
|
160 |
||
161 |
virtual bool visit(Block *) { return true; } |
|
162 |
virtual void endVisit(Block *) {} |
|
163 |
||
164 |
virtual bool visit(StatementList *) { return true; } |
|
165 |
virtual void endVisit(StatementList *) {} |
|
166 |
||
167 |
virtual bool visit(VariableStatement *) { return true; } |
|
168 |
virtual void endVisit(VariableStatement *) {} |
|
169 |
||
170 |
virtual bool visit(VariableDeclarationList *) { return true; } |
|
171 |
virtual void endVisit(VariableDeclarationList *) {} |
|
172 |
||
173 |
virtual bool visit(VariableDeclaration *) { return true; } |
|
174 |
virtual void endVisit(VariableDeclaration *) {} |
|
175 |
||
176 |
virtual bool visit(EmptyStatement *) { return true; } |
|
177 |
virtual void endVisit(EmptyStatement *) {} |
|
178 |
||
179 |
virtual bool visit(ExpressionStatement *) { return true; } |
|
180 |
virtual void endVisit(ExpressionStatement *) {} |
|
181 |
||
182 |
virtual bool visit(IfStatement *) { return true; } |
|
183 |
virtual void endVisit(IfStatement *) {} |
|
184 |
||
185 |
virtual bool visit(DoWhileStatement *) { return true; } |
|
186 |
virtual void endVisit(DoWhileStatement *) {} |
|
187 |
||
188 |
virtual bool visit(WhileStatement *) { return true; } |
|
189 |
virtual void endVisit(WhileStatement *) {} |
|
190 |
||
191 |
virtual bool visit(ForStatement *) { return true; } |
|
192 |
virtual void endVisit(ForStatement *) {} |
|
193 |
||
194 |
virtual bool visit(LocalForStatement *) { return true; } |
|
195 |
virtual void endVisit(LocalForStatement *) {} |
|
196 |
||
197 |
virtual bool visit(ForEachStatement *) { return true; } |
|
198 |
virtual void endVisit(ForEachStatement *) {} |
|
199 |
||
200 |
virtual bool visit(LocalForEachStatement *) { return true; } |
|
201 |
virtual void endVisit(LocalForEachStatement *) {} |
|
202 |
||
203 |
virtual bool visit(ContinueStatement *) { return true; } |
|
204 |
virtual void endVisit(ContinueStatement *) {} |
|
205 |
||
206 |
virtual bool visit(BreakStatement *) { return true; } |
|
207 |
virtual void endVisit(BreakStatement *) {} |
|
208 |
||
209 |
virtual bool visit(ReturnStatement *) { return true; } |
|
210 |
virtual void endVisit(ReturnStatement *) {} |
|
211 |
||
212 |
virtual bool visit(WithStatement *) { return true; } |
|
213 |
virtual void endVisit(WithStatement *) {} |
|
214 |
||
215 |
virtual bool visit(SwitchStatement *) { return true; } |
|
216 |
virtual void endVisit(SwitchStatement *) {} |
|
217 |
||
218 |
virtual bool visit(CaseBlock *) { return true; } |
|
219 |
virtual void endVisit(CaseBlock *) {} |
|
220 |
||
221 |
virtual bool visit(CaseClauses *) { return true; } |
|
222 |
virtual void endVisit(CaseClauses *) {} |
|
223 |
||
224 |
virtual bool visit(CaseClause *) { return true; } |
|
225 |
virtual void endVisit(CaseClause *) {} |
|
226 |
||
227 |
virtual bool visit(DefaultClause *) { return true; } |
|
228 |
virtual void endVisit(DefaultClause *) {} |
|
229 |
||
230 |
virtual bool visit(LabelledStatement *) { return true; } |
|
231 |
virtual void endVisit(LabelledStatement *) {} |
|
232 |
||
233 |
virtual bool visit(ThrowStatement *) { return true; } |
|
234 |
virtual void endVisit(ThrowStatement *) {} |
|
235 |
||
236 |
virtual bool visit(TryStatement *) { return true; } |
|
237 |
virtual void endVisit(TryStatement *) {} |
|
238 |
||
239 |
virtual bool visit(Catch *) { return true; } |
|
240 |
virtual void endVisit(Catch *) {} |
|
241 |
||
242 |
virtual bool visit(Finally *) { return true; } |
|
243 |
virtual void endVisit(Finally *) {} |
|
244 |
||
245 |
virtual bool visit(FunctionDeclaration *) { return true; } |
|
246 |
virtual void endVisit(FunctionDeclaration *) {} |
|
247 |
||
248 |
virtual bool visit(FunctionExpression *) { return true; } |
|
249 |
virtual void endVisit(FunctionExpression *) {} |
|
250 |
||
251 |
virtual bool visit(FormalParameterList *) { return true; } |
|
252 |
virtual void endVisit(FormalParameterList *) {} |
|
253 |
||
254 |
virtual bool visit(FunctionBody *) { return true; } |
|
255 |
virtual void endVisit(FunctionBody *) {} |
|
256 |
||
257 |
virtual bool visit(Program *) { return true; } |
|
258 |
virtual void endVisit(Program *) {} |
|
259 |
||
260 |
virtual bool visit(SourceElements *) { return true; } |
|
261 |
virtual void endVisit(SourceElements *) {} |
|
262 |
||
263 |
virtual bool visit(FunctionSourceElement *) { return true; } |
|
264 |
virtual void endVisit(FunctionSourceElement *) {} |
|
265 |
||
266 |
virtual bool visit(StatementSourceElement *) { return true; } |
|
267 |
virtual void endVisit(StatementSourceElement *) {} |
|
268 |
||
269 |
virtual bool visit(DebuggerStatement *) { return true; } |
|
270 |
virtual void endVisit(DebuggerStatement *) {} |
|
271 |
}; |
|
272 |
||
273 |
} } // namespace AST |
|
274 |
||
275 |
QT_END_NAMESPACE |
|
276 |
||
277 |
#endif // QSCRIPTASTVISITOR_P_H |