jltools.ext.jl.ast
Class FloatLit_c
java.lang.Object
|
+--jltools.ext.jl.ast.Node_c
|
+--jltools.ext.jl.ast.Expr_c
|
+--jltools.ext.jl.ast.Lit_c
|
+--jltools.ext.jl.ast.FloatLit_c
- All Implemented Interfaces:
- java.lang.Cloneable, Copy, Expr, FloatLit, Lit, Node, Prefix, Receiver, java.io.Serializable, Typed
- public class FloatLit_c
- extends Lit_c
- implements FloatLit
A FloatLit
represents a literal in java of type
float
or double
.
- See Also:
- Serialized Form
Fields inherited from class jltools.ext.jl.ast.Expr_c |
type |
Methods inherited from class jltools.ext.jl.ast.Node_c |
buildTypes, buildTypesOverride_, buildTypesOverride, copy, disambiguate_, disambiguate, disambiguateOverride_, disambiguateOverride, disambiguateTypes_, disambiguateTypes, disambiguateTypesOverride_, disambiguateTypesOverride, enterScope, exceptionCheck_, exceptionCheck, exceptionCheckOverride_, exceptionCheckOverride, ext, ext, foldConstants_, foldConstants, foldConstantsOverride_, foldConstantsOverride, leaveScope, position, position, reconstructTypes, translate, translateBlock, translateSubstmt, typeCheck, typeCheckOverride_, typeCheckOverride, visit, visitChildren, visitList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jltools.ast.Node |
buildTypes_, buildTypesOverride_, copy, disambiguate_, disambiguateOverride_, disambiguateTypes_, disambiguateTypesOverride_, dump, enterScope, exceptionCheck_, exceptionCheckOverride_, ext, ext, foldConstants_, foldConstantsOverride_, leaveScope, position, position, reconstructTypes_, typeCheckOverride_, visit, visitChildren |
Methods inherited from interface jltools.ast.Typed |
type |
kind
protected FloatLit.Kind kind
value
protected double value
FloatLit_c
public FloatLit_c(Ext ext,
Position pos,
FloatLit.Kind kind,
double value)
kind
public FloatLit.Kind kind()
- Get the kind of the literal.
- Specified by:
kind
in interface FloatLit
kind
public FloatLit kind(FloatLit.Kind kind)
- Set the kind of the literal.
- Specified by:
kind
in interface FloatLit
value
public double value()
- Get the value of the expression.
- Specified by:
value
in interface FloatLit
objValue
public java.lang.Object objValue()
- Get the value of the expression, as an object.
- Specified by:
objValue
in interface Lit
- Overrides:
objValue
in class Lit_c
value
public FloatLit value(double value)
- Set the value of the expression.
- Specified by:
value
in interface FloatLit
typeCheck_
public Node typeCheck_(TypeChecker tc)
throws SemanticException
- Type check the expression.
- Specified by:
typeCheck_
in interface Node
- Overrides:
typeCheck_
in class Node_c
toString
public java.lang.String toString()
- Overrides:
toString
in class Node_c
translate_
public void translate_(CodeWriter w,
Translator tr)
- Write the expression to an output file.
- Specified by:
translate_
in interface Node
- Overrides:
translate_
in class Node_c
- Following copied from interface:
jltools.ast.Node
- Parameters:
w
- The code writer to which to write.tr
- The translation pass. This is not a visitor.