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 40 44 public class FloatNode extends Node implements ILiteralNode { 45 static final long serialVersionUID = -6358513813684285950L; 46 47 private double value; 48 49 public FloatNode(ISourcePosition position, double value) { 50 super(position, NodeTypes.FLOATNODE); 51 this.value = value; 52 } 53 54 public Instruction accept(NodeVisitor iVisitor) { 55 return iVisitor.visitFloatNode(this); 56 } 57 58 62 public double getValue() { 63 return value; 64 } 65 66 70 public void setValue(double value) { 71 this.value = value; 72 } 73 74 public List childNodes() { 75 return EMPTY_LIST; 76 } 77 78 } 79 | Popular Tags |