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 AndNode extends Node implements BinaryOperatorNode { 44 static final long serialVersionUID = 1716928209521564017L; 45 46 private final Node firstNode; 47 private final Node secondNode; 48 49 public AndNode(ISourcePosition position, Node firstNode, Node secondNode) { 50 super(position, NodeTypes.ANDNODE); 51 this.firstNode = firstNode; 52 this.secondNode = secondNode; 53 } 54 55 public Instruction accept(NodeVisitor iVisitor) { 56 return iVisitor.visitAndNode(this); 57 } 58 59 63 public Node getSecondNode() { 64 return secondNode; 65 } 66 67 71 public Node getFirstNode() { 72 return firstNode; 73 } 74 75 public List childNodes() { 76 return Node.createList(firstNode, secondNode); 77 } 78 79 } 80 | Popular Tags |