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 import org.jruby.parser.StaticScope; 39 40 50 public class SClassNode extends Node { 51 static final long serialVersionUID = -3706492163082062224L; 52 53 private final Node receiverNode; 54 private final StaticScope scope; 55 private final Node bodyNode; 56 57 public SClassNode(ISourcePosition position, Node recvNode, StaticScope scope, Node bodyNode) { 58 super(position, NodeTypes.SCLASSNODE); 59 this.receiverNode = recvNode; 60 this.scope = scope; 61 this.bodyNode = bodyNode; 62 } 63 64 68 public Instruction accept(NodeVisitor iVisitor) { 69 return iVisitor.visitSClassNode(this); 70 } 71 72 77 public Node getBodyNode() { 78 return bodyNode; 79 } 80 81 86 public StaticScope getScope() { 87 return scope; 88 } 89 90 94 public Node getReceiverNode() { 95 return receiverNode; 96 } 97 98 public List childNodes() { 99 return Node.createList(receiverNode, bodyNode); 100 } 101 } 102 | Popular Tags |