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 OrNode extends Node implements BinaryOperatorNode { 44 static final long serialVersionUID = 2822549471181976227L; 45 46 private final Node firstNode; 47 private final Node secondNode; 48 49 public OrNode(ISourcePosition position, Node firstNode, Node secondNode) { 50 super(position, NodeTypes.ORNODE); 51 this.firstNode = firstNode; 52 this.secondNode = secondNode; 53 } 54 55 59 public Instruction accept(NodeVisitor iVisitor) { 60 return iVisitor.visitOrNode(this); 61 } 62 63 67 public Node getFirstNode() { 68 return firstNode; 69 } 70 71 75 public Node getSecondNode() { 76 return secondNode; 77 } 78 79 public List childNodes() { 80 return Node.createList(firstNode, secondNode); 81 } 82 83 } 84 | Popular Tags |