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 YieldNode extends Node { 44 static final long serialVersionUID = -4136185449481135660L; 45 46 private final Node argsNode; 47 private final boolean checkState; 48 49 public YieldNode(ISourcePosition position, Node argsNode, boolean checkState) { 50 super(position, NodeTypes.YIELDNODE); 51 this.argsNode = argsNode; 52 this.checkState = checkState; 53 } 54 55 59 public Instruction accept(NodeVisitor iVisitor) { 60 return iVisitor.visitYieldNode(this); 61 } 62 63 67 public Node getArgsNode() { 68 return argsNode; 69 } 70 71 public boolean getCheckState() { 72 return checkState; 73 } 74 75 public List childNodes() { 76 return createList(argsNode); 77 } 78 79 } 80 | Popular Tags |