jltools.ext.jl.ast
Class IntLit_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.NumLit_c
                          |
                          +--jltools.ext.jl.ast.IntLit_c
All Implemented Interfaces:
java.lang.Cloneable, Copy, Expr, IntLit, Lit, Node, NumLit, Prefix, Receiver, java.io.Serializable, Typed

public class IntLit_c
extends NumLit_c
implements IntLit

An IntLit represents a literal in Java of an integer type.

See Also:
Serialized Form

Inner classes inherited from class jltools.ext.jl.ast.Node_c
Node_c.StringCodeWriter
 
Inner classes inherited from class jltools.ast.IntLit
IntLit.Kind
 
Field Summary
protected  jltools.ext.jl.ast.Kind kind
           
 
Fields inherited from class jltools.ext.jl.ast.NumLit_c
value
 
Fields inherited from class jltools.ext.jl.ast.Expr_c
type
 
Fields inherited from class jltools.ext.jl.ast.Node_c
ext, position
 
Fields inherited from interface jltools.ast.IntLit
BYTE, INT, LONG, SHORT
 
Constructor Summary
IntLit_c(Ext ext, Position pos, long value)
           
 
Method Summary
 IntLit.Kind kind()
          Get the kind of the expression.
 IntLit kind(IntLit.Kind kind)
          Set the kind of the expression.
 java.lang.String toString()
           
 void translate_(CodeWriter w, Translator tr)
          Translate the AST using the given code writer.
 Node typeCheck_(TypeChecker tc)
          Type check the expression.
 long value()
          Get the value of the expression.
 IntLit value(long value)
          Set the value of the expression.
 
Methods inherited from class jltools.ext.jl.ast.NumLit_c
longValue, objValue
 
Methods inherited from class jltools.ext.jl.ast.Lit_c
precedence
 
Methods inherited from class jltools.ext.jl.ast.Expr_c
buildTypes_, dump, reconstructTypes_, translateSubexpr, type, 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.NumLit
longValue
 
Methods inherited from interface jltools.ast.Lit
objValue
 
Methods inherited from interface jltools.ast.Expr
precedence, type
 
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
 

Field Detail

kind

protected jltools.ext.jl.ast.Kind kind
Constructor Detail

IntLit_c

public IntLit_c(Ext ext,
                Position pos,
                long value)
Method Detail

value

public long value()
Get the value of the expression.
Specified by:
value in interface IntLit

value

public IntLit value(long value)
Set the value of the expression.
Specified by:
value in interface IntLit

kind

public IntLit.Kind kind()
Get the kind of the expression.
Specified by:
kind in interface IntLit

kind

public IntLit kind(IntLit.Kind kind)
Set the kind of the expression.
Specified by:
kind in interface IntLit

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)
Description copied from interface: Node
Translate the AST using the given code writer.
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.