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 45 public class BlockPassNode extends Node { 46 static final long serialVersionUID = 7201862349971094217L; 47 48 private final Node bodyNode; 49 50 53 private Node argsNode; 54 55 public BlockPassNode(ISourcePosition position, Node bodyNode) { 56 super(position, NodeTypes.BLOCKPASSNODE); 57 this.bodyNode = bodyNode; 58 } 59 60 64 public Instruction accept(NodeVisitor iVisitor) { 65 return iVisitor.visitBlockPassNode(this); 66 } 67 68 72 public Node getBodyNode() { 73 return bodyNode; 74 } 75 76 80 public Node getArgsNode() { 81 return argsNode; 82 } 83 84 88 public void setArgsNode(Node argsNode) { 89 this.argsNode = argsNode; 90 } 91 92 public List childNodes() { 93 return Node.createList(argsNode, bodyNode); 94 } 95 96 } 97 | Popular Tags |