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 42 public class SuperNode extends Node implements BlockAcceptingNode { 43 static final long serialVersionUID = 5158689332796676417L; 44 45 private final Node argsNode; 46 private Node iterNode; 47 48 public SuperNode(ISourcePosition position, Node argsNode) { 49 this(position, argsNode, null); 50 } 51 52 public SuperNode(ISourcePosition position, Node argsNode, Node iterNode) { 53 super(position, NodeTypes.SUPERNODE); 54 this.argsNode = argsNode; 55 this.iterNode = iterNode; 56 } 57 58 62 public Instruction accept(NodeVisitor iVisitor) { 63 return iVisitor.visitSuperNode(this); 64 } 65 66 70 public Node getArgsNode() { 71 return argsNode; 72 } 73 74 public List childNodes() { 75 return createList(argsNode); 76 } 77 78 public Node getIterNode() { 79 return iterNode; 80 } 81 82 public void setIterNode(Node iterNode) { 83 this.iterNode = iterNode; 84 } 85 86 } 87 | Popular Tags |