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