288 return r;
289 }
290
291 /**
292 * {@inheritDoc}
293 *
294 * @implSpec This implementation scans the children in left to right order.
295 *
296 * @param node {@inheritDoc}
297 * @param p {@inheritDoc}
298 * @return the result of scanning
299 */
300 @Override
301 public R visitWhileLoop(WhileLoopTree node, P p) {
302 R r = scan(node.getCondition(), p);
303 r = scanAndReduce(node.getStatement(), p, r);
304 return r;
305 }
306
307 /**
308 * {@inheritDoc}
309 *
310 * @implSpec This implementation scans the children in left to right order.
311 *
312 * @param node {@inheritDoc}
313 * @param p {@inheritDoc}
314 * @return the result of scanning
315 */
316 @Override
317 public R visitForLoop(ForLoopTree node, P p) {
318 R r = scan(node.getInitializer(), p);
319 r = scanAndReduce(node.getCondition(), p, r);
320 r = scanAndReduce(node.getUpdate(), p, r);
321 r = scanAndReduce(node.getStatement(), p, r);
322 return r;
323 }
324
325 /**
326 * {@inheritDoc}
327 *
328 * @implSpec This implementation scans the children in left to right order.
329 *
330 * @param node {@inheritDoc}
|
288 return r;
289 }
290
291 /**
292 * {@inheritDoc}
293 *
294 * @implSpec This implementation scans the children in left to right order.
295 *
296 * @param node {@inheritDoc}
297 * @param p {@inheritDoc}
298 * @return the result of scanning
299 */
300 @Override
301 public R visitWhileLoop(WhileLoopTree node, P p) {
302 R r = scan(node.getCondition(), p);
303 r = scanAndReduce(node.getStatement(), p, r);
304 return r;
305 }
306
307 /**
308 * {@inheritDoc} This implementation scans the children in left to right order.
309 *
310 * @param node {@inheritDoc}
311 * @param p {@inheritDoc}
312 * @return the result of scanning
313 */
314 @Override
315 public R visitForLoop(ForLoopTree node, P p) {
316 R r = scan(node.getInitializer(), p);
317 r = scanAndReduce(node.getCondition(), p, r);
318 r = scanAndReduce(node.getUpdate(), p, r);
319 r = scanAndReduce(node.getStatement(), p, r);
320 return r;
321 }
322
323 /**
324 * {@inheritDoc}
325 *
326 * @implSpec This implementation scans the children in left to right order.
327 *
328 * @param node {@inheritDoc}
|