1 /* |
1 /* |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
116 * @return value from the visitor |
116 * @return value from the visitor |
117 */ |
117 */ |
118 R visitCatch(CatchTree node, P p); |
118 R visitCatch(CatchTree node, P p); |
119 |
119 |
120 /** |
120 /** |
|
121 * Visit class statement tree. |
|
122 * |
|
123 * @param node node being visited |
|
124 * @param p extra parameter passed to the visitor |
|
125 * @return value from the visitor |
|
126 */ |
|
127 R visitClassDeclaration(ClassDeclarationTree node, P p); |
|
128 |
|
129 /** |
|
130 * Visit class expression tree. |
|
131 * |
|
132 * @param node node being visited |
|
133 * @param p extra parameter passed to the visitor |
|
134 * @return value from the visitor |
|
135 */ |
|
136 R visitClassExpression(ClassExpressionTree node, P p); |
|
137 |
|
138 /** |
121 * Visit conditional expression tree. |
139 * Visit conditional expression tree. |
122 * |
140 * |
123 * @param node node being visited |
141 * @param node node being visited |
124 * @param p extra parameter passed to the visitor |
142 * @param p extra parameter passed to the visitor |
125 * @return value from the visitor |
143 * @return value from the visitor |
188 * @return value from the visitor |
206 * @return value from the visitor |
189 */ |
207 */ |
190 R visitForInLoop(ForInLoopTree node, P p); |
208 R visitForInLoop(ForInLoopTree node, P p); |
191 |
209 |
192 /** |
210 /** |
|
211 * Visit for..of statement tree. |
|
212 * |
|
213 * @param node node being visited |
|
214 * @param p extra parameter passed to the visitor |
|
215 * @return value from the visitor |
|
216 */ |
|
217 R visitForOfLoop(ForOfLoopTree node, P p); |
|
218 |
|
219 /** |
193 * Visit function call expression tree. |
220 * Visit function call expression tree. |
194 * |
221 * |
195 * @param node node being visited |
222 * @param node node being visited |
196 * @param p extra parameter passed to the visitor |
223 * @param p extra parameter passed to the visitor |
197 * @return value from the visitor |
224 * @return value from the visitor |
214 * @param p extra parameter passed to the visitor |
241 * @param p extra parameter passed to the visitor |
215 * @return value from the visitor |
242 * @return value from the visitor |
216 */ |
243 */ |
217 R visitFunctionExpression(FunctionExpressionTree node, P p); |
244 R visitFunctionExpression(FunctionExpressionTree node, P p); |
218 |
245 |
219 /** |
246 /** |
220 * Visit identifier tree. |
247 * Visit identifier tree. |
221 * |
248 * |
222 * @param node node being visited |
249 * @param node node being visited |
223 * @param p extra parameter passed to the visitor |
250 * @param p extra parameter passed to the visitor |
224 * @return value from the visitor |
251 * @return value from the visitor |
332 * @return value from the visitor |
359 * @return value from the visitor |
333 */ |
360 */ |
334 R visitRegExpLiteral(RegExpLiteralTree node, P p); |
361 R visitRegExpLiteral(RegExpLiteralTree node, P p); |
335 |
362 |
336 /** |
363 /** |
|
364 * Visit template literal tree. |
|
365 * |
|
366 * @param node node being visited |
|
367 * @param p extra parameter passed to the visitor |
|
368 * @return value from the visitor |
|
369 */ |
|
370 R visitTemplateLiteral(TemplateLiteralTree node, P p); |
|
371 |
|
372 /** |
337 * Visit an empty statement tree. |
373 * Visit an empty statement tree. |
338 * |
374 * |
339 * @param node node being visited |
375 * @param node node being visited |
340 * @param p extra parameter passed to the visitor |
376 * @param p extra parameter passed to the visitor |
341 * @return value from the visitor |
377 * @return value from the visitor |
342 */ |
378 */ |
343 R visitEmptyStatement(EmptyStatementTree node, P p); |
379 R visitEmptyStatement(EmptyStatementTree node, P p); |
344 |
380 |
345 /** |
381 /** |
|
382 * Visit 'spread' expression tree. |
|
383 * |
|
384 * @param node node being visited |
|
385 * @param p extra parameter passed to the visitor |
|
386 * @return value from the visitor |
|
387 */ |
|
388 R visitSpread(SpreadTree node, P p); |
|
389 |
|
390 /** |
346 * Visit 'switch' statement tree. |
391 * Visit 'switch' statement tree. |
347 * |
392 * |
348 * @param node node being visited |
393 * @param node node being visited |
349 * @param p extra parameter passed to the visitor |
394 * @param p extra parameter passed to the visitor |
350 * @return value from the visitor |
395 * @return value from the visitor |
368 * @return value from the visitor |
413 * @return value from the visitor |
369 */ |
414 */ |
370 R visitCompilationUnit(CompilationUnitTree node, P p); |
415 R visitCompilationUnit(CompilationUnitTree node, P p); |
371 |
416 |
372 /** |
417 /** |
|
418 * Visit Module tree. |
|
419 * |
|
420 * @param node node being visited |
|
421 * @param p extra parameter passed to the visitor |
|
422 * @return value from the visitor |
|
423 */ |
|
424 R visitModule(ModuleTree node, P p); |
|
425 |
|
426 /** |
|
427 * Visit Module ExportEntry tree. |
|
428 * |
|
429 * @param node node being visited |
|
430 * @param p extra parameter passed to the visitor |
|
431 * @return value from the visitor |
|
432 */ |
|
433 R visitExportEntry(ExportEntryTree node, P p); |
|
434 |
|
435 /** |
|
436 * Visit Module ImportEntry tree. |
|
437 * |
|
438 * @param node node being visited |
|
439 * @param p extra parameter passed to the visitor |
|
440 * @return value from the visitor |
|
441 */ |
|
442 R visitImportEntry(ImportEntryTree node, P p); |
|
443 |
|
444 /** |
373 * Visit 'try' statement tree. |
445 * Visit 'try' statement tree. |
374 * |
446 * |
375 * @param node node being visited |
447 * @param node node being visited |
376 * @param p extra parameter passed to the visitor |
448 * @param p extra parameter passed to the visitor |
377 * @return value from the visitor |
449 * @return value from the visitor |
420 * @param node node being visited |
492 * @param node node being visited |
421 * @param p extra parameter passed to the visitor |
493 * @param p extra parameter passed to the visitor |
422 * @return value from the visitor |
494 * @return value from the visitor |
423 */ |
495 */ |
424 R visitWith(WithTree node, P p); |
496 R visitWith(WithTree node, P p); |
|
497 |
|
498 /** |
|
499 * Visit 'yield' expression tree. |
|
500 * |
|
501 * @param node node being visited |
|
502 * @param p extra parameter passed to the visitor |
|
503 * @return value from the visitor |
|
504 */ |
|
505 R visitYield(YieldTree node, P p); |
425 |
506 |
426 /** |
507 /** |
427 * Visit unknown expression/statement tree. This fallback will be |
508 * Visit unknown expression/statement tree. This fallback will be |
428 * called if new Tree subtypes are introduced in future. A specific |
509 * called if new Tree subtypes are introduced in future. A specific |
429 * implementation may throw {{@linkplain UnknownTreeException unknown tree exception} |
510 * implementation may throw {{@linkplain UnknownTreeException unknown tree exception} |