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 NextNode extends Node { 44 static final long serialVersionUID = -6688896555206419923L; 45 46 private final Node valueNode; 47 48 public NextNode(ISourcePosition position) { 49 super(position, NodeTypes.NEXTNODE); 50 valueNode = null; 51 } 52 53 public NextNode(ISourcePosition position, Node valueNode) { 54 super(position, NodeTypes.NEXTNODE); 55 this.valueNode = valueNode; 56 } 57 58 62 public Instruction accept(NodeVisitor iVisitor) { 63 return iVisitor.visitNextNode(this); 64 } 65 66 70 public Node getValueNode() { 71 return valueNode; 72 } 73 74 public List childNodes() { 75 return createList(valueNode); 76 } 77 78 } 79 | Popular Tags |