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 OptNNode extends Node { 44 static final long serialVersionUID = -742216664550880045L; 45 46 private final Node bodyNode; 47 48 public OptNNode(ISourcePosition position, Node bodyNode) { 49 super(position, NodeTypes.OPTNNODE); 50 this.bodyNode = bodyNode; 51 } 52 53 57 public Instruction accept(NodeVisitor iVisitor) { 58 return iVisitor.visitOptNNode(this); 59 } 60 61 65 public Node getBodyNode() { 66 return bodyNode; 67 } 68 69 public List childNodes() { 70 return createList(bodyNode); 71 } 72 73 } 74 | Popular Tags |