Exemple #1
0
  @Override
  public Object visit(LoopNode node) {
    StringBuilder sb = new StringBuilder();

    sb.append("REPEAT UNTIL(");
    sb.append(visit(node.GetLeftChild()));
    sb.append(")\n");
    sb.append(visit(node.GetRightChild()));
    sb.append("END REPEAT\n");

    return sb.toString();
  }
 /**
  * Creates a {@link LoopNode} node and returns a sub builder for adding nodes to the {@link
  * LoopNode} node.
  *
  * @return Returns a new generic builder for a loop node.
  */
 public GenericBuilder<GenericBuilder<P>> loop() {
   final LoopNode loop = LoopNode.newInstance(parentNode);
   parentNode.addChild(loop);
   return new GenericBuilder<GenericBuilder<P>>(this, loop);
 }