16147
|
1 |
/*
|
|
2 |
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
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
|
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
|
24 |
*/
|
|
25 |
|
|
26 |
package jdk.nashorn.internal.ir.visitor;
|
|
27 |
|
|
28 |
import jdk.nashorn.internal.codegen.CompileUnit;
|
|
29 |
import jdk.nashorn.internal.codegen.MethodEmitter;
|
|
30 |
import jdk.nashorn.internal.ir.BinaryNode;
|
|
31 |
import jdk.nashorn.internal.ir.Node;
|
|
32 |
import jdk.nashorn.internal.ir.UnaryNode;
|
|
33 |
|
|
34 |
/**
|
|
35 |
* Like NodeVisitor but navigating further into operators.
|
|
36 |
*/
|
|
37 |
public class NodeOperatorVisitor extends NodeVisitor {
|
|
38 |
/**
|
|
39 |
* Constructor
|
|
40 |
*/
|
|
41 |
public NodeOperatorVisitor() {
|
|
42 |
super();
|
|
43 |
}
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Constructor
|
|
47 |
*
|
|
48 |
* @param compileUnit compile unit
|
|
49 |
* @param method method emitter
|
|
50 |
*/
|
|
51 |
public NodeOperatorVisitor(final CompileUnit compileUnit, final MethodEmitter method) {
|
|
52 |
super(compileUnit, method);
|
|
53 |
}
|
|
54 |
|
|
55 |
@Override
|
|
56 |
public final Node enter(final UnaryNode unaryNode) {
|
|
57 |
switch (unaryNode.tokenType()) {
|
|
58 |
case ADD:
|
|
59 |
return enterADD(unaryNode);
|
|
60 |
case BIT_NOT:
|
|
61 |
return enterBIT_NOT(unaryNode);
|
|
62 |
case CONVERT:
|
|
63 |
return enterCONVERT(unaryNode);
|
|
64 |
case DELETE:
|
|
65 |
return enterDELETE(unaryNode);
|
|
66 |
case DISCARD:
|
|
67 |
return enterDISCARD(unaryNode);
|
|
68 |
case NEW:
|
|
69 |
return enterNEW(unaryNode);
|
|
70 |
case NOT:
|
|
71 |
return enterNOT(unaryNode);
|
|
72 |
case SUB:
|
|
73 |
return enterSUB(unaryNode);
|
|
74 |
case TYPEOF:
|
|
75 |
return enterTYPEOF(unaryNode);
|
|
76 |
case VOID:
|
|
77 |
return enterVOID(unaryNode);
|
|
78 |
case DECPREFIX:
|
|
79 |
case DECPOSTFIX:
|
|
80 |
case INCPREFIX:
|
|
81 |
case INCPOSTFIX:
|
|
82 |
return enterDECINC(unaryNode);
|
|
83 |
default:
|
|
84 |
return super.enter(unaryNode);
|
|
85 |
}
|
|
86 |
}
|
|
87 |
|
|
88 |
@Override
|
|
89 |
public final Node leave(final UnaryNode unaryNode) {
|
|
90 |
switch (unaryNode.tokenType()) {
|
|
91 |
case ADD:
|
|
92 |
return leaveADD(unaryNode);
|
|
93 |
case BIT_NOT:
|
|
94 |
return leaveBIT_NOT(unaryNode);
|
|
95 |
case CONVERT:
|
|
96 |
return leaveCONVERT(unaryNode);
|
|
97 |
case DELETE:
|
|
98 |
return leaveDELETE(unaryNode);
|
|
99 |
case DISCARD:
|
|
100 |
return leaveDISCARD(unaryNode);
|
|
101 |
case NEW:
|
|
102 |
return leaveNEW(unaryNode);
|
|
103 |
case NOT:
|
|
104 |
return leaveNOT(unaryNode);
|
|
105 |
case SUB:
|
|
106 |
return leaveSUB(unaryNode);
|
|
107 |
case TYPEOF:
|
|
108 |
return leaveTYPEOF(unaryNode);
|
|
109 |
case VOID:
|
|
110 |
return leaveVOID(unaryNode);
|
|
111 |
case DECPREFIX:
|
|
112 |
case DECPOSTFIX:
|
|
113 |
case INCPREFIX:
|
|
114 |
case INCPOSTFIX:
|
|
115 |
return leaveDECINC(unaryNode);
|
|
116 |
default:
|
|
117 |
return super.leave(unaryNode);
|
|
118 |
}
|
|
119 |
}
|
|
120 |
|
|
121 |
@Override
|
|
122 |
public final Node enter(final BinaryNode binaryNode) {
|
|
123 |
switch (binaryNode.tokenType()) {
|
|
124 |
case ADD:
|
|
125 |
return enterADD(binaryNode);
|
|
126 |
case AND:
|
|
127 |
return enterAND(binaryNode);
|
|
128 |
case ASSIGN:
|
|
129 |
return enterASSIGN(binaryNode);
|
|
130 |
case ASSIGN_ADD:
|
|
131 |
return enterASSIGN_ADD(binaryNode);
|
|
132 |
case ASSIGN_BIT_AND:
|
|
133 |
return enterASSIGN_BIT_AND(binaryNode);
|
|
134 |
case ASSIGN_BIT_OR:
|
|
135 |
return enterASSIGN_BIT_OR(binaryNode);
|
|
136 |
case ASSIGN_BIT_XOR:
|
|
137 |
return enterASSIGN_BIT_XOR(binaryNode);
|
|
138 |
case ASSIGN_DIV:
|
|
139 |
return enterASSIGN_DIV(binaryNode);
|
|
140 |
case ASSIGN_MOD:
|
|
141 |
return enterASSIGN_MOD(binaryNode);
|
|
142 |
case ASSIGN_MUL:
|
|
143 |
return enterASSIGN_MUL(binaryNode);
|
|
144 |
case ASSIGN_SAR:
|
|
145 |
return enterASSIGN_SAR(binaryNode);
|
|
146 |
case ASSIGN_SHL:
|
|
147 |
return enterASSIGN_SHL(binaryNode);
|
|
148 |
case ASSIGN_SHR:
|
|
149 |
return enterASSIGN_SHR(binaryNode);
|
|
150 |
case ASSIGN_SUB:
|
|
151 |
return enterASSIGN_SUB(binaryNode);
|
|
152 |
case BIND:
|
|
153 |
return enterBIND(binaryNode);
|
|
154 |
case BIT_AND:
|
|
155 |
return enterBIT_AND(binaryNode);
|
|
156 |
case BIT_OR:
|
|
157 |
return enterBIT_OR(binaryNode);
|
|
158 |
case BIT_XOR:
|
|
159 |
return enterBIT_XOR(binaryNode);
|
|
160 |
case COMMARIGHT:
|
|
161 |
return enterCOMMARIGHT(binaryNode);
|
|
162 |
case COMMALEFT:
|
|
163 |
return enterCOMMALEFT(binaryNode);
|
|
164 |
case DIV:
|
|
165 |
return enterDIV(binaryNode);
|
|
166 |
case EQ:
|
|
167 |
return enterEQ(binaryNode);
|
|
168 |
case EQ_STRICT:
|
|
169 |
return enterEQ_STRICT(binaryNode);
|
|
170 |
case GE:
|
|
171 |
return enterGE(binaryNode);
|
|
172 |
case GT:
|
|
173 |
return enterGT(binaryNode);
|
|
174 |
case IN:
|
|
175 |
return enterIN(binaryNode);
|
|
176 |
case INSTANCEOF:
|
|
177 |
return enterINSTANCEOF(binaryNode);
|
|
178 |
case LE:
|
|
179 |
return enterLE(binaryNode);
|
|
180 |
case LT:
|
|
181 |
return enterLT(binaryNode);
|
|
182 |
case MOD:
|
|
183 |
return enterMOD(binaryNode);
|
|
184 |
case MUL:
|
|
185 |
return enterMUL(binaryNode);
|
|
186 |
case NE:
|
|
187 |
return enterNE(binaryNode);
|
|
188 |
case NE_STRICT:
|
|
189 |
return enterNE_STRICT(binaryNode);
|
|
190 |
case OR:
|
|
191 |
return enterOR(binaryNode);
|
|
192 |
case SAR:
|
|
193 |
return enterSAR(binaryNode);
|
|
194 |
case SHL:
|
|
195 |
return enterSHL(binaryNode);
|
|
196 |
case SHR:
|
|
197 |
return enterSHR(binaryNode);
|
|
198 |
case SUB:
|
|
199 |
return enterSUB(binaryNode);
|
|
200 |
default:
|
|
201 |
return super.enter(binaryNode);
|
|
202 |
}
|
|
203 |
}
|
|
204 |
|
|
205 |
@Override
|
|
206 |
public final Node leave(final BinaryNode binaryNode) {
|
|
207 |
switch (binaryNode.tokenType()) {
|
|
208 |
case ADD:
|
|
209 |
return leaveADD(binaryNode);
|
|
210 |
case AND:
|
|
211 |
return leaveAND(binaryNode);
|
|
212 |
case ASSIGN:
|
|
213 |
return leaveASSIGN(binaryNode);
|
|
214 |
case ASSIGN_ADD:
|
|
215 |
return leaveASSIGN_ADD(binaryNode);
|
|
216 |
case ASSIGN_BIT_AND:
|
|
217 |
return leaveASSIGN_BIT_AND(binaryNode);
|
|
218 |
case ASSIGN_BIT_OR:
|
|
219 |
return leaveASSIGN_BIT_OR(binaryNode);
|
|
220 |
case ASSIGN_BIT_XOR:
|
|
221 |
return leaveASSIGN_BIT_XOR(binaryNode);
|
|
222 |
case ASSIGN_DIV:
|
|
223 |
return leaveASSIGN_DIV(binaryNode);
|
|
224 |
case ASSIGN_MOD:
|
|
225 |
return leaveASSIGN_MOD(binaryNode);
|
|
226 |
case ASSIGN_MUL:
|
|
227 |
return leaveASSIGN_MUL(binaryNode);
|
|
228 |
case ASSIGN_SAR:
|
|
229 |
return leaveASSIGN_SAR(binaryNode);
|
|
230 |
case ASSIGN_SHL:
|
|
231 |
return leaveASSIGN_SHL(binaryNode);
|
|
232 |
case ASSIGN_SHR:
|
|
233 |
return leaveASSIGN_SHR(binaryNode);
|
|
234 |
case ASSIGN_SUB:
|
|
235 |
return leaveASSIGN_SUB(binaryNode);
|
|
236 |
case BIND:
|
|
237 |
return leaveBIND(binaryNode);
|
|
238 |
case BIT_AND:
|
|
239 |
return leaveBIT_AND(binaryNode);
|
|
240 |
case BIT_OR:
|
|
241 |
return leaveBIT_OR(binaryNode);
|
|
242 |
case BIT_XOR:
|
|
243 |
return leaveBIT_XOR(binaryNode);
|
|
244 |
case COMMARIGHT:
|
|
245 |
return leaveCOMMARIGHT(binaryNode);
|
|
246 |
case COMMALEFT:
|
|
247 |
return leaveCOMMALEFT(binaryNode);
|
|
248 |
case DIV:
|
|
249 |
return leaveDIV(binaryNode);
|
|
250 |
case EQ:
|
|
251 |
return leaveEQ(binaryNode);
|
|
252 |
case EQ_STRICT:
|
|
253 |
return leaveEQ_STRICT(binaryNode);
|
|
254 |
case GE:
|
|
255 |
return leaveGE(binaryNode);
|
|
256 |
case GT:
|
|
257 |
return leaveGT(binaryNode);
|
|
258 |
case IN:
|
|
259 |
return leaveIN(binaryNode);
|
|
260 |
case INSTANCEOF:
|
|
261 |
return leaveINSTANCEOF(binaryNode);
|
|
262 |
case LE:
|
|
263 |
return leaveLE(binaryNode);
|
|
264 |
case LT:
|
|
265 |
return leaveLT(binaryNode);
|
|
266 |
case MOD:
|
|
267 |
return leaveMOD(binaryNode);
|
|
268 |
case MUL:
|
|
269 |
return leaveMUL(binaryNode);
|
|
270 |
case NE:
|
|
271 |
return leaveNE(binaryNode);
|
|
272 |
case NE_STRICT:
|
|
273 |
return leaveNE_STRICT(binaryNode);
|
|
274 |
case OR:
|
|
275 |
return leaveOR(binaryNode);
|
|
276 |
case SAR:
|
|
277 |
return leaveSAR(binaryNode);
|
|
278 |
case SHL:
|
|
279 |
return leaveSHL(binaryNode);
|
|
280 |
case SHR:
|
|
281 |
return leaveSHR(binaryNode);
|
|
282 |
case SUB:
|
|
283 |
return leaveSUB(binaryNode);
|
|
284 |
default:
|
|
285 |
return super.leave(binaryNode);
|
|
286 |
}
|
|
287 |
}
|
|
288 |
|
|
289 |
/*
|
|
290 |
@Override
|
|
291 |
public Node enter(final TernaryNode ternaryNode) {
|
|
292 |
return enterDefault(ternaryNode);
|
|
293 |
}
|
|
294 |
|
|
295 |
@Override
|
|
296 |
public Node leave(final TernaryNode ternaryNode) {
|
|
297 |
return leaveDefault(ternaryNode);
|
|
298 |
}*/
|
|
299 |
|
|
300 |
/*
|
|
301 |
* Unary entries and exists.
|
|
302 |
*/
|
|
303 |
|
|
304 |
/**
|
|
305 |
* Unary enter - callback for entering a unary +
|
|
306 |
*
|
|
307 |
* @param unaryNode the node
|
|
308 |
* @return processed node
|
|
309 |
*/
|
|
310 |
public Node enterADD(final UnaryNode unaryNode) {
|
|
311 |
return enterDefault(unaryNode);
|
|
312 |
}
|
|
313 |
|
|
314 |
/**
|
|
315 |
* Unary leave - callback for leaving a unary +
|
|
316 |
*
|
|
317 |
* @param unaryNode the node
|
|
318 |
* @return processed node, which will replace the original one, or the original node
|
|
319 |
*/
|
|
320 |
public Node leaveADD(final UnaryNode unaryNode) {
|
|
321 |
return leaveDefault(unaryNode);
|
|
322 |
}
|
|
323 |
|
|
324 |
/**
|
|
325 |
* Unary enter - callback for entering a ~ operator
|
|
326 |
*
|
|
327 |
* @param unaryNode the node
|
|
328 |
* @return processed node
|
|
329 |
*/
|
|
330 |
public Node enterBIT_NOT(final UnaryNode unaryNode) {
|
|
331 |
return enterDefault(unaryNode);
|
|
332 |
}
|
|
333 |
|
|
334 |
/**
|
|
335 |
* Unary leave - callback for leaving a unary ~
|
|
336 |
*
|
|
337 |
* @param unaryNode the node
|
|
338 |
* @return processed node, which will replace the original one, or the original node
|
|
339 |
*/
|
|
340 |
public Node leaveBIT_NOT(final UnaryNode unaryNode) {
|
|
341 |
return leaveDefault(unaryNode);
|
|
342 |
}
|
|
343 |
|
|
344 |
/**
|
|
345 |
* Unary enter - callback for entering a conversion
|
|
346 |
*
|
|
347 |
* @param unaryNode the node
|
|
348 |
* @return processed node
|
|
349 |
*/
|
|
350 |
public Node enterCONVERT(final UnaryNode unaryNode) {
|
|
351 |
return enterDefault(unaryNode);
|
|
352 |
}
|
|
353 |
|
|
354 |
/**
|
|
355 |
* Unary leave - callback for leaving a conversion
|
|
356 |
*
|
|
357 |
* @param unaryNode the node
|
|
358 |
* @return processed node, which will replace the original one, or the original node
|
|
359 |
*/
|
|
360 |
public Node leaveCONVERT(final UnaryNode unaryNode) {
|
|
361 |
return leaveDefault(unaryNode);
|
|
362 |
}
|
|
363 |
|
|
364 |
/**
|
|
365 |
* Unary enter - callback for entering a ++ or -- operator
|
|
366 |
*
|
|
367 |
* @param unaryNode the node
|
|
368 |
* @return processed node
|
|
369 |
*/
|
|
370 |
public Node enterDECINC(final UnaryNode unaryNode) {
|
|
371 |
return enterDefault(unaryNode);
|
|
372 |
}
|
|
373 |
|
|
374 |
/**
|
|
375 |
* Unary leave - callback for leaving a ++ or -- operator
|
|
376 |
*
|
|
377 |
* @param unaryNode the node
|
|
378 |
* @return processed node, which will replace the original one, or the original node
|
|
379 |
*/
|
|
380 |
public Node leaveDECINC(final UnaryNode unaryNode) {
|
|
381 |
return leaveDefault(unaryNode);
|
|
382 |
}
|
|
383 |
|
|
384 |
/**
|
|
385 |
* Unary enter - callback for entering a delete operator
|
|
386 |
*
|
|
387 |
* @param unaryNode the node
|
|
388 |
* @return processed node
|
|
389 |
*/
|
|
390 |
public Node enterDELETE(final UnaryNode unaryNode) {
|
|
391 |
return enterDefault(unaryNode);
|
|
392 |
}
|
|
393 |
|
|
394 |
/**
|
|
395 |
* Unary leave - callback for leaving a delete operator
|
|
396 |
*
|
|
397 |
* @param unaryNode the node
|
|
398 |
* @return processed node, which will replace the original one, or the original node
|
|
399 |
*/
|
|
400 |
public Node leaveDELETE(final UnaryNode unaryNode) {
|
|
401 |
return leaveDefault(unaryNode);
|
|
402 |
}
|
|
403 |
|
|
404 |
/**
|
|
405 |
* Unary enter - callback for entering a discard operator
|
|
406 |
*
|
|
407 |
* @param unaryNode the node
|
|
408 |
* @return processed node
|
|
409 |
*/
|
|
410 |
public Node enterDISCARD(final UnaryNode unaryNode) {
|
|
411 |
return enterDefault(unaryNode);
|
|
412 |
}
|
|
413 |
|
|
414 |
/**
|
|
415 |
* Unary leave - callback for leaving a discard operator
|
|
416 |
*
|
|
417 |
* @param unaryNode the node
|
|
418 |
* @return processed node, which will replace the original one, or the original node
|
|
419 |
*/
|
|
420 |
public Node leaveDISCARD(final UnaryNode unaryNode) {
|
|
421 |
return leaveDefault(unaryNode);
|
|
422 |
}
|
|
423 |
|
|
424 |
/**
|
|
425 |
* Unary enter - callback for entering a new operator
|
|
426 |
*
|
|
427 |
* @param unaryNode the node
|
|
428 |
* @return processed node
|
|
429 |
*/
|
|
430 |
public Node enterNEW(final UnaryNode unaryNode) {
|
|
431 |
return enterDefault(unaryNode);
|
|
432 |
}
|
|
433 |
|
|
434 |
/**
|
|
435 |
* Unary leave - callback for leaving a new operator
|
|
436 |
*
|
|
437 |
* @param unaryNode the node
|
|
438 |
* @return processed node, which will replace the original one, or the original node
|
|
439 |
*/
|
|
440 |
public Node leaveNEW(final UnaryNode unaryNode) {
|
|
441 |
return leaveDefault(unaryNode);
|
|
442 |
}
|
|
443 |
|
|
444 |
/**
|
|
445 |
* Unary enter - callback for entering a ! operator
|
|
446 |
*
|
|
447 |
* @param unaryNode the node
|
|
448 |
* @return processed node
|
|
449 |
*/
|
|
450 |
public Node enterNOT(final UnaryNode unaryNode) {
|
|
451 |
return enterDefault(unaryNode);
|
|
452 |
}
|
|
453 |
|
|
454 |
/**
|
|
455 |
* Unary leave - callback for leaving a ! operator
|
|
456 |
*
|
|
457 |
* @param unaryNode the node
|
|
458 |
* @return processed node, which will replace the original one, or the original node
|
|
459 |
*/
|
|
460 |
public Node leaveNOT(final UnaryNode unaryNode) {
|
|
461 |
return leaveDefault(unaryNode);
|
|
462 |
}
|
|
463 |
|
|
464 |
/**
|
|
465 |
* Unary enter - callback for entering a unary -
|
|
466 |
*
|
|
467 |
* @param unaryNode the node
|
|
468 |
* @return processed node
|
|
469 |
*/
|
|
470 |
public Node enterSUB(final UnaryNode unaryNode) {
|
|
471 |
return enterDefault(unaryNode);
|
|
472 |
}
|
|
473 |
|
|
474 |
/**
|
|
475 |
* Unary leave - callback for leaving a unary -
|
|
476 |
*
|
|
477 |
* @param unaryNode the node
|
|
478 |
* @return processed node, which will replace the original one, or the original node
|
|
479 |
*/
|
|
480 |
public Node leaveSUB(final UnaryNode unaryNode) {
|
|
481 |
return leaveDefault(unaryNode);
|
|
482 |
}
|
|
483 |
|
|
484 |
/**
|
|
485 |
* Unary enter - callback for entering a typeof
|
|
486 |
*
|
|
487 |
* @param unaryNode the node
|
|
488 |
* @return processed node
|
|
489 |
*/
|
|
490 |
public Node enterTYPEOF(final UnaryNode unaryNode) {
|
|
491 |
return enterDefault(unaryNode);
|
|
492 |
}
|
|
493 |
|
|
494 |
/**
|
|
495 |
* Unary leave - callback for leaving a typeof operator
|
|
496 |
*
|
|
497 |
* @param unaryNode the node
|
|
498 |
* @return processed node, which will replace the original one, or the original node
|
|
499 |
*/
|
|
500 |
public Node leaveTYPEOF(final UnaryNode unaryNode) {
|
|
501 |
return leaveDefault(unaryNode);
|
|
502 |
}
|
|
503 |
|
|
504 |
/**
|
|
505 |
* Unary enter - callback for entering a void
|
|
506 |
*
|
|
507 |
* @param unaryNode the node
|
|
508 |
* @return processed node
|
|
509 |
*/
|
|
510 |
public Node enterVOID(final UnaryNode unaryNode) {
|
|
511 |
return enterDefault(unaryNode);
|
|
512 |
}
|
|
513 |
|
|
514 |
/**
|
|
515 |
* Unary leave - callback for leaving a void
|
|
516 |
*
|
|
517 |
* @param unaryNode the node
|
|
518 |
* @return processed node, which will replace the original one, or the original node
|
|
519 |
*/
|
|
520 |
public Node leaveVOID(final UnaryNode unaryNode) {
|
|
521 |
return leaveDefault(unaryNode);
|
|
522 |
}
|
|
523 |
|
|
524 |
/**
|
|
525 |
* Binary enter - callback for entering + operator
|
|
526 |
*
|
|
527 |
* @param binaryNode the node
|
|
528 |
* @return processed node
|
|
529 |
*/
|
|
530 |
public Node enterADD(final BinaryNode binaryNode) {
|
|
531 |
return enterDefault(binaryNode);
|
|
532 |
}
|
|
533 |
|
|
534 |
/**
|
|
535 |
* Binary leave - callback for leaving a + operator
|
|
536 |
*
|
|
537 |
* @param binaryNode the node
|
|
538 |
* @return processed node, which will replace the original one, or the original node
|
|
539 |
*/
|
|
540 |
public Node leaveADD(final BinaryNode binaryNode) {
|
|
541 |
return leaveDefault(binaryNode);
|
|
542 |
}
|
|
543 |
|
|
544 |
/**
|
|
545 |
* Binary enter - callback for entering && operator
|
|
546 |
*
|
|
547 |
* @param binaryNode the node
|
|
548 |
* @return processed node
|
|
549 |
*/
|
|
550 |
public Node enterAND(final BinaryNode binaryNode) {
|
|
551 |
return enterDefault(binaryNode);
|
|
552 |
}
|
|
553 |
|
|
554 |
/**
|
|
555 |
* Binary leave - callback for leaving a && operator
|
|
556 |
*
|
|
557 |
* @param binaryNode the node
|
|
558 |
* @return processed node, which will replace the original one, or the original node
|
|
559 |
*/
|
|
560 |
public Node leaveAND(final BinaryNode binaryNode) {
|
|
561 |
return leaveDefault(binaryNode);
|
|
562 |
}
|
|
563 |
|
|
564 |
/**
|
|
565 |
* Binary enter - callback for entering an assignment
|
|
566 |
*
|
|
567 |
* @param binaryNode the node
|
|
568 |
* @return processed node
|
|
569 |
*/
|
|
570 |
public Node enterASSIGN(final BinaryNode binaryNode) {
|
|
571 |
return enterDefault(binaryNode);
|
|
572 |
}
|
|
573 |
|
|
574 |
/**
|
|
575 |
* Binary leave - callback for leaving an assignment
|
|
576 |
*
|
|
577 |
* @param binaryNode the node
|
|
578 |
* @return processed node, which will replace the original one, or the original node
|
|
579 |
*/
|
|
580 |
public Node leaveASSIGN(final BinaryNode binaryNode) {
|
|
581 |
return leaveDefault(binaryNode);
|
|
582 |
}
|
|
583 |
|
|
584 |
/**
|
|
585 |
* Binary enter - callback for entering += operator
|
|
586 |
*
|
|
587 |
* @param binaryNode the node
|
|
588 |
* @return processed node
|
|
589 |
*/
|
|
590 |
public Node enterASSIGN_ADD(final BinaryNode binaryNode) {
|
|
591 |
return enterDefault(binaryNode);
|
|
592 |
}
|
|
593 |
|
|
594 |
/**
|
|
595 |
* Binary leave - callback for leaving a += operator
|
|
596 |
*
|
|
597 |
* @param binaryNode the node
|
|
598 |
* @return processed node, which will replace the original one, or the original node
|
|
599 |
*/
|
|
600 |
public Node leaveASSIGN_ADD(final BinaryNode binaryNode) {
|
|
601 |
return leaveDefault(binaryNode);
|
|
602 |
}
|
|
603 |
|
|
604 |
/**
|
|
605 |
* Binary enter - callback for entering &= operator
|
|
606 |
*
|
|
607 |
* @param binaryNode the node
|
|
608 |
* @return processed node
|
|
609 |
*/
|
|
610 |
public Node enterASSIGN_BIT_AND(final BinaryNode binaryNode) {
|
|
611 |
return enterDefault(binaryNode);
|
|
612 |
}
|
|
613 |
|
|
614 |
/**
|
|
615 |
* Binary leave - callback for leaving a &= operator
|
|
616 |
*
|
|
617 |
* @param binaryNode the node
|
|
618 |
* @return processed node, which will replace the original one, or the original node
|
|
619 |
*/
|
|
620 |
public Node leaveASSIGN_BIT_AND(final BinaryNode binaryNode) {
|
|
621 |
return leaveDefault(binaryNode);
|
|
622 |
}
|
|
623 |
|
|
624 |
/**
|
|
625 |
* Binary enter - callback for entering |= operator
|
|
626 |
*
|
|
627 |
* @param binaryNode the node
|
|
628 |
* @return processed node
|
|
629 |
*/
|
|
630 |
public Node enterASSIGN_BIT_OR(final BinaryNode binaryNode) {
|
|
631 |
return enterDefault(binaryNode);
|
|
632 |
}
|
|
633 |
|
|
634 |
/**
|
|
635 |
* Binary leave - callback for leaving a |= operator
|
|
636 |
*
|
|
637 |
* @param binaryNode the node
|
|
638 |
* @return processed node, which will replace the original one, or the original node
|
|
639 |
*/
|
|
640 |
public Node leaveASSIGN_BIT_OR(final BinaryNode binaryNode) {
|
|
641 |
return leaveDefault(binaryNode);
|
|
642 |
}
|
|
643 |
|
|
644 |
/**
|
|
645 |
* Binary enter - callback for entering ^= operator
|
|
646 |
*
|
|
647 |
* @param binaryNode the node
|
|
648 |
* @return processed node
|
|
649 |
*/
|
|
650 |
public Node enterASSIGN_BIT_XOR(final BinaryNode binaryNode) {
|
|
651 |
return enterDefault(binaryNode);
|
|
652 |
}
|
|
653 |
|
|
654 |
/**
|
|
655 |
* Binary leave - callback for leaving a ^= operator
|
|
656 |
*
|
|
657 |
* @param binaryNode the node
|
|
658 |
* @return processed node, which will replace the original one, or the original node
|
|
659 |
*/
|
|
660 |
public Node leaveASSIGN_BIT_XOR(final BinaryNode binaryNode) {
|
|
661 |
return leaveDefault(binaryNode);
|
|
662 |
}
|
|
663 |
|
|
664 |
/**
|
|
665 |
* Binary enter - callback for entering /= operator
|
|
666 |
*
|
|
667 |
* @param binaryNode the node
|
|
668 |
* @return processed node
|
|
669 |
*/
|
|
670 |
public Node enterASSIGN_DIV(final BinaryNode binaryNode) {
|
|
671 |
return enterDefault(binaryNode);
|
|
672 |
}
|
|
673 |
|
|
674 |
/**
|
|
675 |
* Binary leave - callback for leaving a /= operator
|
|
676 |
*
|
|
677 |
* @param binaryNode the node
|
|
678 |
* @return processed node, which will replace the original one, or the original node
|
|
679 |
*/
|
|
680 |
public Node leaveASSIGN_DIV(final BinaryNode binaryNode) {
|
|
681 |
return leaveDefault(binaryNode);
|
|
682 |
}
|
|
683 |
|
|
684 |
/**
|
|
685 |
* Binary enter - callback for entering %= operator
|
|
686 |
*
|
|
687 |
* @param binaryNode the node
|
|
688 |
* @return processed node
|
|
689 |
*/
|
|
690 |
public Node enterASSIGN_MOD(final BinaryNode binaryNode) {
|
|
691 |
return enterDefault(binaryNode);
|
|
692 |
}
|
|
693 |
|
|
694 |
/**
|
|
695 |
* Binary leave - callback for leaving a %= operator
|
|
696 |
*
|
|
697 |
* @param binaryNode the node
|
|
698 |
* @return processed node, which will replace the original one, or the original node
|
|
699 |
*/
|
|
700 |
public Node leaveASSIGN_MOD(final BinaryNode binaryNode) {
|
|
701 |
return leaveDefault(binaryNode);
|
|
702 |
}
|
|
703 |
|
|
704 |
/**
|
|
705 |
* Binary enter - callback for entering *= operator
|
|
706 |
*
|
|
707 |
* @param binaryNode the node
|
|
708 |
* @return processed node
|
|
709 |
*/
|
|
710 |
public Node enterASSIGN_MUL(final BinaryNode binaryNode) {
|
|
711 |
return enterDefault(binaryNode);
|
|
712 |
}
|
|
713 |
|
|
714 |
/**
|
|
715 |
* Binary leave - callback for leaving a *= operator
|
|
716 |
*
|
|
717 |
* @param binaryNode the node
|
|
718 |
* @return processed node, which will replace the original one, or the original node
|
|
719 |
*/
|
|
720 |
public Node leaveASSIGN_MUL(final BinaryNode binaryNode) {
|
|
721 |
return leaveDefault(binaryNode);
|
|
722 |
}
|
|
723 |
|
|
724 |
/**
|
|
725 |
* Binary enter - callback for entering >>= operator
|
|
726 |
*
|
|
727 |
* @param binaryNode the node
|
|
728 |
* @return processed node
|
|
729 |
*/
|
|
730 |
public Node enterASSIGN_SAR(final BinaryNode binaryNode) {
|
|
731 |
return enterDefault(binaryNode);
|
|
732 |
}
|
|
733 |
|
|
734 |
/**
|
|
735 |
* Binary leave - callback for leaving a >>= operator
|
|
736 |
*
|
|
737 |
* @param binaryNode the node
|
|
738 |
* @return processed node, which will replace the original one, or the original node
|
|
739 |
*/
|
|
740 |
public Node leaveASSIGN_SAR(final BinaryNode binaryNode) {
|
|
741 |
return leaveDefault(binaryNode);
|
|
742 |
}
|
|
743 |
|
|
744 |
/**
|
|
745 |
* Binary enter - callback for entering a <<= operator
|
|
746 |
*
|
|
747 |
* @param binaryNode the node
|
|
748 |
* @return processed node
|
|
749 |
*/
|
|
750 |
public Node enterASSIGN_SHL(final BinaryNode binaryNode) {
|
|
751 |
return enterDefault(binaryNode);
|
|
752 |
}
|
|
753 |
|
|
754 |
/**
|
|
755 |
* Binary leave - callback for leaving a <<= operator
|
|
756 |
*
|
|
757 |
* @param binaryNode the node
|
|
758 |
* @return processed node, which will replace the original one, or the original node
|
|
759 |
*/
|
|
760 |
public Node leaveASSIGN_SHL(final BinaryNode binaryNode) {
|
|
761 |
return leaveDefault(binaryNode);
|
|
762 |
}
|
|
763 |
|
|
764 |
/**
|
|
765 |
* Binary enter - callback for entering >>>= operator
|
|
766 |
*
|
|
767 |
* @param binaryNode the node
|
|
768 |
* @return processed node
|
|
769 |
*/
|
|
770 |
public Node enterASSIGN_SHR(final BinaryNode binaryNode) {
|
|
771 |
return enterDefault(binaryNode);
|
|
772 |
}
|
|
773 |
|
|
774 |
/**
|
|
775 |
* Binary leave - callback for leaving a >>>= operator
|
|
776 |
*
|
|
777 |
* @param binaryNode the node
|
|
778 |
* @return processed node, which will replace the original one, or the original node
|
|
779 |
*/
|
|
780 |
public Node leaveASSIGN_SHR(final BinaryNode binaryNode) {
|
|
781 |
return leaveDefault(binaryNode);
|
|
782 |
}
|
|
783 |
|
|
784 |
/**
|
|
785 |
* Binary enter - callback for entering -= operator
|
|
786 |
*
|
|
787 |
* @param binaryNode the node
|
|
788 |
* @return processed node
|
|
789 |
*/
|
|
790 |
public Node enterASSIGN_SUB(final BinaryNode binaryNode) {
|
|
791 |
return enterDefault(binaryNode);
|
|
792 |
}
|
|
793 |
|
|
794 |
/**
|
|
795 |
* Binary leave - callback for leaving a -= operator
|
|
796 |
*
|
|
797 |
* @param binaryNode the node
|
|
798 |
* @return processed node, which will replace the original one, or the original node
|
|
799 |
*/
|
|
800 |
public Node leaveASSIGN_SUB(final BinaryNode binaryNode) {
|
|
801 |
return leaveDefault(binaryNode);
|
|
802 |
}
|
|
803 |
|
|
804 |
/**
|
|
805 |
* Binary enter - callback for entering a bind operator
|
|
806 |
*
|
|
807 |
* @param binaryNode the node
|
|
808 |
* @return processed node
|
|
809 |
*/
|
|
810 |
public Node enterBIND(final BinaryNode binaryNode) {
|
|
811 |
return enterDefault(binaryNode);
|
|
812 |
}
|
|
813 |
|
|
814 |
/**
|
|
815 |
* Binary leave - callback for leaving a bind operator
|
|
816 |
*
|
|
817 |
* @param binaryNode the node
|
|
818 |
* @return processed node, which will replace the original one, or the original node
|
|
819 |
*/
|
|
820 |
public Node leaveBIND(final BinaryNode binaryNode) {
|
|
821 |
return leaveDefault(binaryNode);
|
|
822 |
}
|
|
823 |
|
|
824 |
/**
|
|
825 |
* Binary enter - callback for entering & operator
|
|
826 |
*
|
|
827 |
* @param binaryNode the node
|
|
828 |
* @return processed node
|
|
829 |
*/
|
|
830 |
public Node enterBIT_AND(final BinaryNode binaryNode) {
|
|
831 |
return enterDefault(binaryNode);
|
|
832 |
}
|
|
833 |
|
|
834 |
/**
|
|
835 |
* Binary leave - callback for leaving a & operator
|
|
836 |
*
|
|
837 |
* @param binaryNode the node
|
|
838 |
* @return processed node, which will replace the original one, or the original node
|
|
839 |
*/
|
|
840 |
public Node leaveBIT_AND(final BinaryNode binaryNode) {
|
|
841 |
return leaveDefault(binaryNode);
|
|
842 |
}
|
|
843 |
|
|
844 |
/**
|
|
845 |
* Binary enter - callback for entering | operator
|
|
846 |
*
|
|
847 |
* @param binaryNode the node
|
|
848 |
* @return processed node
|
|
849 |
*/
|
|
850 |
public Node enterBIT_OR(final BinaryNode binaryNode) {
|
|
851 |
return enterDefault(binaryNode);
|
|
852 |
}
|
|
853 |
|
|
854 |
/**
|
|
855 |
* Binary leave - callback for leaving a | operator
|
|
856 |
*
|
|
857 |
* @param binaryNode the node
|
|
858 |
* @return processed node, which will replace the original one, or the original node
|
|
859 |
*/
|
|
860 |
public Node leaveBIT_OR(final BinaryNode binaryNode) {
|
|
861 |
return leaveDefault(binaryNode);
|
|
862 |
}
|
|
863 |
|
|
864 |
/**
|
|
865 |
* Binary enter - callback for entering ^ operator
|
|
866 |
*
|
|
867 |
* @param binaryNode the node
|
|
868 |
* @return processed node
|
|
869 |
*/
|
|
870 |
public Node enterBIT_XOR(final BinaryNode binaryNode) {
|
|
871 |
return enterDefault(binaryNode);
|
|
872 |
}
|
|
873 |
|
|
874 |
/**
|
|
875 |
* Binary leave - callback for leaving a operator
|
|
876 |
*
|
|
877 |
* @param binaryNode the node
|
|
878 |
* @return processed node, which will replace the original one, or the original node
|
|
879 |
*/
|
|
880 |
public Node leaveBIT_XOR(final BinaryNode binaryNode) {
|
|
881 |
return leaveDefault(binaryNode);
|
|
882 |
}
|
|
883 |
|
|
884 |
/**
|
|
885 |
* Binary enter - callback for entering comma left operator
|
|
886 |
* (a, b) where the result is a
|
|
887 |
*
|
|
888 |
* @param binaryNode the node
|
|
889 |
* @return processed node
|
|
890 |
*/
|
|
891 |
public Node enterCOMMALEFT(final BinaryNode binaryNode) {
|
|
892 |
return enterDefault(binaryNode);
|
|
893 |
}
|
|
894 |
|
|
895 |
/**
|
|
896 |
* Binary leave - callback for leaving a comma left operator
|
|
897 |
* (a, b) where the result is a
|
|
898 |
*
|
|
899 |
* @param binaryNode the node
|
|
900 |
* @return processed node, which will replace the original one, or the original node
|
|
901 |
*/
|
|
902 |
public Node leaveCOMMALEFT(final BinaryNode binaryNode) {
|
|
903 |
return leaveDefault(binaryNode);
|
|
904 |
}
|
|
905 |
|
|
906 |
/**
|
|
907 |
* Binary enter - callback for entering comma right operator
|
|
908 |
* (a, b) where the result is b
|
|
909 |
*
|
|
910 |
* @param binaryNode the node
|
|
911 |
* @return processed node
|
|
912 |
*/
|
|
913 |
public Node enterCOMMARIGHT(final BinaryNode binaryNode) {
|
|
914 |
return enterDefault(binaryNode);
|
|
915 |
}
|
|
916 |
|
|
917 |
/**
|
|
918 |
* Binary leave - callback for leaving a comma left operator
|
|
919 |
* (a, b) where the result is b
|
|
920 |
*
|
|
921 |
* @param binaryNode the node
|
|
922 |
* @return processed node, which will replace the original one, or the original node
|
|
923 |
*/
|
|
924 |
public Node leaveCOMMARIGHT(final BinaryNode binaryNode) {
|
|
925 |
return leaveDefault(binaryNode);
|
|
926 |
}
|
|
927 |
|
|
928 |
/**
|
|
929 |
* Binary enter - callback for entering a division
|
|
930 |
*
|
|
931 |
* @param binaryNode the node
|
|
932 |
* @return processed node
|
|
933 |
*/
|
|
934 |
public Node enterDIV(final BinaryNode binaryNode) {
|
|
935 |
return enterDefault(binaryNode);
|
|
936 |
}
|
|
937 |
|
|
938 |
/**
|
|
939 |
* Binary leave - callback for leaving a division
|
|
940 |
*
|
|
941 |
* @param binaryNode the node
|
|
942 |
* @return processed node, which will replace the original one, or the original node
|
|
943 |
*/
|
|
944 |
public Node leaveDIV(final BinaryNode binaryNode) {
|
|
945 |
return leaveDefault(binaryNode);
|
|
946 |
}
|
|
947 |
|
|
948 |
/**
|
|
949 |
* Binary enter - callback for entering == operator
|
|
950 |
*
|
|
951 |
* @param binaryNode the node
|
|
952 |
* @return processed node
|
|
953 |
*/
|
|
954 |
public Node enterEQ(final BinaryNode binaryNode) {
|
|
955 |
return enterDefault(binaryNode);
|
|
956 |
}
|
|
957 |
|
|
958 |
/**
|
|
959 |
* Binary leave - callback for leaving == operator
|
|
960 |
*
|
|
961 |
* @param binaryNode the node
|
|
962 |
* @return processed node, which will replace the original one, or the original node
|
|
963 |
*/
|
|
964 |
public Node leaveEQ(final BinaryNode binaryNode) {
|
|
965 |
return leaveDefault(binaryNode);
|
|
966 |
}
|
|
967 |
|
|
968 |
/**
|
|
969 |
* Binary enter - callback for entering === operator
|
|
970 |
*
|
|
971 |
* @param binaryNode the node
|
|
972 |
* @return processed node
|
|
973 |
*/
|
|
974 |
public Node enterEQ_STRICT(final BinaryNode binaryNode) {
|
|
975 |
return enterDefault(binaryNode);
|
|
976 |
}
|
|
977 |
|
|
978 |
/**
|
|
979 |
* Binary leave - callback for leaving === operator
|
|
980 |
*
|
|
981 |
* @param binaryNode the node
|
|
982 |
* @return processed node, which will replace the original one, or the original node
|
|
983 |
*/
|
|
984 |
public Node leaveEQ_STRICT(final BinaryNode binaryNode) {
|
|
985 |
return leaveDefault(binaryNode);
|
|
986 |
}
|
|
987 |
|
|
988 |
/**
|
|
989 |
* Binary enter - callback for entering >= operator
|
|
990 |
*
|
|
991 |
* @param binaryNode the node
|
|
992 |
* @return processed node
|
|
993 |
*/
|
|
994 |
public Node enterGE(final BinaryNode binaryNode) {
|
|
995 |
return enterDefault(binaryNode);
|
|
996 |
}
|
|
997 |
|
|
998 |
/**
|
|
999 |
* Binary leave - callback for leaving >= operator
|
|
1000 |
*
|
|
1001 |
* @param binaryNode the node
|
|
1002 |
* @return processed node, which will replace the original one, or the original node
|
|
1003 |
*/
|
|
1004 |
public Node leaveGE(final BinaryNode binaryNode) {
|
|
1005 |
return leaveDefault(binaryNode);
|
|
1006 |
}
|
|
1007 |
|
|
1008 |
/**
|
|
1009 |
* Binary enter - callback for entering > operator
|
|
1010 |
*
|
|
1011 |
* @param binaryNode the node
|
|
1012 |
* @return processed node
|
|
1013 |
*/
|
|
1014 |
public Node enterGT(final BinaryNode binaryNode) {
|
|
1015 |
return enterDefault(binaryNode);
|
|
1016 |
}
|
|
1017 |
|
|
1018 |
/**
|
|
1019 |
* Binary leave - callback for leaving > operator
|
|
1020 |
*
|
|
1021 |
* @param binaryNode the node
|
|
1022 |
* @return processed node, which will replace the original one, or the original node
|
|
1023 |
*/
|
|
1024 |
public Node leaveGT(final BinaryNode binaryNode) {
|
|
1025 |
return leaveDefault(binaryNode);
|
|
1026 |
}
|
|
1027 |
|
|
1028 |
/**
|
|
1029 |
* Binary enter - callback for entering in operator
|
|
1030 |
*
|
|
1031 |
* @param binaryNode the node
|
|
1032 |
* @return processed node
|
|
1033 |
*/
|
|
1034 |
public Node enterIN(final BinaryNode binaryNode) {
|
|
1035 |
return enterDefault(binaryNode);
|
|
1036 |
}
|
|
1037 |
|
|
1038 |
/**
|
|
1039 |
* Binary leave - callback for leaving in operator
|
|
1040 |
*
|
|
1041 |
* @param binaryNode the node
|
|
1042 |
* @return processed node, which will replace the original one, or the original node
|
|
1043 |
*/
|
|
1044 |
public Node leaveIN(final BinaryNode binaryNode) {
|
|
1045 |
return leaveDefault(binaryNode);
|
|
1046 |
}
|
|
1047 |
|
|
1048 |
/**
|
|
1049 |
* Binary enter - callback for entering instanceof operator
|
|
1050 |
*
|
|
1051 |
* @param binaryNode the node
|
|
1052 |
* @return processed node
|
|
1053 |
*/
|
|
1054 |
public Node enterINSTANCEOF(final BinaryNode binaryNode) {
|
|
1055 |
return enterDefault(binaryNode);
|
|
1056 |
}
|
|
1057 |
|
|
1058 |
/**
|
|
1059 |
* Binary leave - callback for leaving instanceof operator
|
|
1060 |
*
|
|
1061 |
* @param binaryNode the node
|
|
1062 |
* @return processed node, which will replace the original one, or the original node
|
|
1063 |
*/
|
|
1064 |
public Node leaveINSTANCEOF(final BinaryNode binaryNode) {
|
|
1065 |
return leaveDefault(binaryNode);
|
|
1066 |
}
|
|
1067 |
|
|
1068 |
/**
|
|
1069 |
* Binary enter - callback for entering <= operator
|
|
1070 |
*
|
|
1071 |
* @param binaryNode the node
|
|
1072 |
* @return processed node
|
|
1073 |
*/
|
|
1074 |
public Node enterLE(final BinaryNode binaryNode) {
|
|
1075 |
return enterDefault(binaryNode);
|
|
1076 |
}
|
|
1077 |
|
|
1078 |
/**
|
|
1079 |
* Binary leave - callback for leaving <= operator
|
|
1080 |
*
|
|
1081 |
* @param binaryNode the node
|
|
1082 |
* @return processed node, which will replace the original one, or the original node
|
|
1083 |
*/
|
|
1084 |
public Node leaveLE(final BinaryNode binaryNode) {
|
|
1085 |
return leaveDefault(binaryNode);
|
|
1086 |
}
|
|
1087 |
|
|
1088 |
/**
|
|
1089 |
* Binary enter - callback for entering < operator
|
|
1090 |
*
|
|
1091 |
* @param binaryNode the node
|
|
1092 |
* @return processed node
|
|
1093 |
*/
|
|
1094 |
public Node enterLT(final BinaryNode binaryNode) {
|
|
1095 |
return enterDefault(binaryNode);
|
|
1096 |
}
|
|
1097 |
|
|
1098 |
/**
|
|
1099 |
* Binary leave - callback for leaving < operator
|
|
1100 |
*
|
|
1101 |
* @param binaryNode the node
|
|
1102 |
* @return processed node, which will replace the original one, or the original node
|
|
1103 |
*/
|
|
1104 |
public Node leaveLT(final BinaryNode binaryNode) {
|
|
1105 |
return leaveDefault(binaryNode);
|
|
1106 |
}
|
|
1107 |
/**
|
|
1108 |
* Binary enter - callback for entering % operator
|
|
1109 |
*
|
|
1110 |
* @param binaryNode the node
|
|
1111 |
* @return processed node
|
|
1112 |
*/
|
|
1113 |
public Node enterMOD(final BinaryNode binaryNode) {
|
|
1114 |
return enterDefault(binaryNode);
|
|
1115 |
}
|
|
1116 |
|
|
1117 |
/**
|
|
1118 |
* Binary leave - callback for leaving % operator
|
|
1119 |
*
|
|
1120 |
* @param binaryNode the node
|
|
1121 |
* @return processed node, which will replace the original one, or the original node
|
|
1122 |
*/
|
|
1123 |
public Node leaveMOD(final BinaryNode binaryNode) {
|
|
1124 |
return leaveDefault(binaryNode);
|
|
1125 |
}
|
|
1126 |
|
|
1127 |
/**
|
|
1128 |
* Binary enter - callback for entering * operator
|
|
1129 |
*
|
|
1130 |
* @param binaryNode the node
|
|
1131 |
* @return processed node
|
|
1132 |
*/
|
|
1133 |
public Node enterMUL(final BinaryNode binaryNode) {
|
|
1134 |
return enterDefault(binaryNode);
|
|
1135 |
}
|
|
1136 |
|
|
1137 |
/**
|
|
1138 |
* Binary leave - callback for leaving * operator
|
|
1139 |
*
|
|
1140 |
* @param binaryNode the node
|
|
1141 |
* @return processed node, which will replace the original one, or the original node
|
|
1142 |
*/
|
|
1143 |
public Node leaveMUL(final BinaryNode binaryNode) {
|
|
1144 |
return leaveDefault(binaryNode);
|
|
1145 |
}
|
|
1146 |
|
|
1147 |
/**
|
|
1148 |
* Binary enter - callback for entering != operator
|
|
1149 |
*
|
|
1150 |
* @param binaryNode the node
|
|
1151 |
* @return processed node
|
|
1152 |
*/
|
|
1153 |
public Node enterNE(final BinaryNode binaryNode) {
|
|
1154 |
return enterDefault(binaryNode);
|
|
1155 |
}
|
|
1156 |
|
|
1157 |
/**
|
|
1158 |
* Binary leave - callback for leaving != operator
|
|
1159 |
*
|
|
1160 |
* @param binaryNode the node
|
|
1161 |
* @return processed node, which will replace the original one, or the original node
|
|
1162 |
*/
|
|
1163 |
public Node leaveNE(final BinaryNode binaryNode) {
|
|
1164 |
return leaveDefault(binaryNode);
|
|
1165 |
}
|
|
1166 |
|
|
1167 |
/**
|
|
1168 |
* Binary enter - callback for entering a !== operator
|
|
1169 |
*
|
|
1170 |
* @param binaryNode the node
|
|
1171 |
* @return processed node
|
|
1172 |
*/
|
|
1173 |
public Node enterNE_STRICT(final BinaryNode binaryNode) {
|
|
1174 |
return enterDefault(binaryNode);
|
|
1175 |
}
|
|
1176 |
|
|
1177 |
/**
|
|
1178 |
* Binary leave - callback for leaving !== operator
|
|
1179 |
*
|
|
1180 |
* @param binaryNode the node
|
|
1181 |
* @return processed node, which will replace the original one, or the original node
|
|
1182 |
*/
|
|
1183 |
public Node leaveNE_STRICT(final BinaryNode binaryNode) {
|
|
1184 |
return leaveDefault(binaryNode);
|
|
1185 |
}
|
|
1186 |
|
|
1187 |
/**
|
|
1188 |
* Binary enter - callback for entering || operator
|
|
1189 |
*
|
|
1190 |
* @param binaryNode the node
|
|
1191 |
* @return processed node
|
|
1192 |
*/
|
|
1193 |
public Node enterOR(final BinaryNode binaryNode) {
|
|
1194 |
return enterDefault(binaryNode);
|
|
1195 |
}
|
|
1196 |
|
|
1197 |
/**
|
|
1198 |
* Binary leave - callback for leaving || operator
|
|
1199 |
*
|
|
1200 |
* @param binaryNode the node
|
|
1201 |
* @return processed node, which will replace the original one, or the original node
|
|
1202 |
*/
|
|
1203 |
public Node leaveOR(final BinaryNode binaryNode) {
|
|
1204 |
return leaveDefault(binaryNode);
|
|
1205 |
}
|
|
1206 |
|
|
1207 |
/**
|
|
1208 |
* Binary enter - callback for entering >> operator
|
|
1209 |
*
|
|
1210 |
* @param binaryNode the node
|
|
1211 |
* @return processed node
|
|
1212 |
*/
|
|
1213 |
public Node enterSAR(final BinaryNode binaryNode) {
|
|
1214 |
return enterDefault(binaryNode);
|
|
1215 |
}
|
|
1216 |
|
|
1217 |
/**
|
|
1218 |
* Binary leave - callback for leaving >> operator
|
|
1219 |
*
|
|
1220 |
* @param binaryNode the node
|
|
1221 |
* @return processed node, which will replace the original one, or the original node
|
|
1222 |
*/
|
|
1223 |
public Node leaveSAR(final BinaryNode binaryNode) {
|
|
1224 |
return leaveDefault(binaryNode);
|
|
1225 |
}
|
|
1226 |
|
|
1227 |
/**
|
|
1228 |
* Binary enter - callback for entering << operator
|
|
1229 |
*
|
|
1230 |
* @param binaryNode the node
|
|
1231 |
* @return processed node
|
|
1232 |
*/
|
|
1233 |
public Node enterSHL(final BinaryNode binaryNode) {
|
|
1234 |
return enterDefault(binaryNode);
|
|
1235 |
}
|
|
1236 |
|
|
1237 |
/**
|
|
1238 |
* Binary leave - callback for leaving << operator
|
|
1239 |
*
|
|
1240 |
* @param binaryNode the node
|
|
1241 |
* @return processed node, which will replace the original one, or the original node
|
|
1242 |
*/
|
|
1243 |
public Node leaveSHL(final BinaryNode binaryNode) {
|
|
1244 |
return leaveDefault(binaryNode);
|
|
1245 |
}
|
|
1246 |
/**
|
|
1247 |
* Binary enter - callback for entering >>> operator
|
|
1248 |
*
|
|
1249 |
* @param binaryNode the node
|
|
1250 |
* @return processed node
|
|
1251 |
*/
|
|
1252 |
public Node enterSHR(final BinaryNode binaryNode) {
|
|
1253 |
return enterDefault(binaryNode);
|
|
1254 |
}
|
|
1255 |
|
|
1256 |
/**
|
|
1257 |
* Binary leave - callback for leaving >>> operator
|
|
1258 |
*
|
|
1259 |
* @param binaryNode the node
|
|
1260 |
* @return processed node, which will replace the original one, or the original node
|
|
1261 |
*/
|
|
1262 |
public Node leaveSHR(final BinaryNode binaryNode) {
|
|
1263 |
return leaveDefault(binaryNode);
|
|
1264 |
}
|
|
1265 |
|
|
1266 |
/**
|
|
1267 |
* Binary enter - callback for entering - operator
|
|
1268 |
*
|
|
1269 |
* @param binaryNode the node
|
|
1270 |
* @return processed node
|
|
1271 |
*/
|
|
1272 |
public Node enterSUB(final BinaryNode binaryNode) {
|
|
1273 |
return enterDefault(binaryNode);
|
|
1274 |
}
|
|
1275 |
|
|
1276 |
/**
|
|
1277 |
* Binary leave - callback for leaving - operator
|
|
1278 |
*
|
|
1279 |
* @param binaryNode the node
|
|
1280 |
* @return processed node, which will replace the original one, or the original node
|
|
1281 |
*/
|
|
1282 |
public Node leaveSUB(final BinaryNode binaryNode) {
|
|
1283 |
return leaveDefault(binaryNode);
|
|
1284 |
}
|
|
1285 |
|
|
1286 |
|
|
1287 |
}
|