1 31 package org.jruby.ast; 32 33 import java.util.List ; 34 35 import org.jruby.ast.visitor.NodeVisitor; 36 import org.jruby.evaluator.Instruction; 37 import org.jruby.lexer.yacc.ISourcePosition; 38 39 43 public class UntilNode extends Node { 44 static final long serialVersionUID = -2929327250252365636L; 45 46 private final Node conditionNode; 47 private final Node bodyNode; 48 49 public UntilNode(ISourcePosition position, Node conditionNode, Node bodyNode) { 50 super(position, NodeTypes.UNTILNODE); 51 this.conditionNode = conditionNode; 52 this.bodyNode = bodyNode; 53 } 54 55 59 public Instruction accept(NodeVisitor iVisitor) { 60 return iVisitor.visitUntilNode(this); 61 } 62 63 67 public Node getBodyNode() { 68 return bodyNode; 69 } 70 71 75 public Node getConditionNode() { 76 return conditionNode; 77 } 78 79 public List childNodes() { 80 return Node.createList(conditionNode, bodyNode); 81 } 82 83 } 84 | Popular Tags |