1 31 package org.jruby.ast; 32 33 import java.util.List ; 34 35 import org.jruby.ast.types.ILiteralNode; 36 import org.jruby.ast.visitor.NodeVisitor; 37 import org.jruby.evaluator.Instruction; 38 import org.jruby.lexer.yacc.ISourcePosition; 39 import org.jruby.util.ByteList; 40 41 46 public class XStrNode extends Node implements ILiteralNode { 47 static final long serialVersionUID = 1371310021447439748L; 48 49 private final ByteList value; 50 51 public XStrNode(ISourcePosition position, ByteList value) { 52 super(position, NodeTypes.XSTRNODE); 53 this.value = (value == null ? ByteList.create("") : value); 54 } 55 56 60 public Instruction accept(NodeVisitor iVisitor) { 61 return iVisitor.visitXStrNode(this); 62 } 63 64 68 public ByteList getValue() { 69 return value; 70 } 71 72 public List childNodes() { 73 return EMPTY_LIST; 74 } 75 76 } 77 | Popular Tags |