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 MatchNode extends Node { 44 static final long serialVersionUID = 9098121695708691474L; 45 46 private final Node regexpNode; 47 48 public MatchNode(ISourcePosition position, Node regexpNode) { 49 super(position, NodeTypes.MATCHNODE); 50 this.regexpNode = regexpNode; 51 } 52 53 57 public Instruction accept(NodeVisitor iVisitor) { 58 return iVisitor.visitMatchNode(this); 59 } 60 61 65 public Node getRegexpNode() { 66 return regexpNode; 67 } 68 69 public List childNodes() { 70 return createList(regexpNode); 71 } 72 73 } 74 | Popular Tags |