Example #1
0
 public Object newMinus(int line, int column, Object left, Object right) {
   MinusNode node = new MinusNode();
   node.setLeft((Node) left);
   node.setRight((Node) right);
   setPosition(node, line, column);
   return node;
 }
Example #2
0
  @Override
  public Object visit(MinusNode node) {
    StringBuilder sb = new StringBuilder();

    sb.append(visit(node.GetLeftChild()));
    sb.append(" - ");
    sb.append(visit(node.GetRightChild()));

    return sb.toString();
  }