AST
node type IntegerLiteral

General Info

Production
IntegerLiteral : NumericLiteral;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Expr
              extended by AST.PrimaryExpr
                  extended by AST.Literal
                      extended by AST.NumericLiteral
                          extended by AST.IntegerLiteral
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Default Java integer literal. Should only be used for numbers that can be stored in 32 bits binary.
Source
Declared in Java7Frontend/Literals.ast at line 48

Member Filters

API level:

Aspect:

Constructors

public IntegerLiteral(int i)
 
Source
Declared in Java1.4Frontend/NodeConstructors.jrag at line 48
Aspect
NodeConstructors
 
public IntegerLiteral(java.lang.String p0)
 
public IntegerLiteral(beaver.Symbol p0)
 

Attributes

syn TypeDecl type()
Description copied from class: NumericLiteral
The type of a NumericLiteral is undefined. The literal must be parsed before it can have a type.
Overrides:type in class NumericLiteral
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 300
Aspect
TypeAnalysis
Parse this literal and return a fresh Constant.
Overrides:constant in class Literal
Returns:
a fresh Constant representing this IntegerLiteral
Source
Declared in Java7Frontend/Literals.jrag at line 139
Aspect
Literals
syn boolean needsRewrite()
Utility attribute for literal rewriting. Any of the NumericLiteral subclasses have already been rewritten and/or parsed, and should not be rewritten again.
Overrides:needsRewrite in class NumericLiteral
Returns:
true if this literal is a "raw", not-yet-parsed NumericLiteral
Source
Declared in Java7Frontend/Literals.jrag at line 334
Aspect
Literals

Methods

public void flushCache()
Overrides:flushCache in class NumericLiteral
public void flushCollectionCache()
public IntegerLiteral clone()
                     throws java.lang.CloneNotSupportedException
Overrides:clone in class NumericLiteral
Throws:
java.lang.CloneNotSupportedException
Overrides:copy in class NumericLiteral
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class NumericLiteral
Returns:
dangling copy of the subtree at this node
public static void push(CodeGeneration gen,
                        int value)
Emit methods
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 456
Aspect
CodeGeneration
Overrides:emitPushConstant in class Literal
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 554
Aspect
CodeGeneration
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class NumericLiteral
protected int numChildren()
Overrides:numChildren in class NumericLiteral
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class NumericLiteral
public void setLITERAL(java.lang.String value)
Replaces the lexeme LITERAL.
Overrides:setLITERAL in class NumericLiteral
Parameters:
value - The new value for the lexeme LITERAL.
public void setLITERAL(beaver.Symbol symbol)
JastAdd-internal setter for lexeme LITERAL using the Beaver parser.
Overrides:setLITERAL in class NumericLiteral
public java.lang.String getLITERAL()
Retrieves the value for the lexeme LITERAL.
Overrides:getLITERAL in class NumericLiteral
Returns:
The value for the lexeme LITERAL.
public void typeCheck()
Check for and report literal-out-of-bounds error. If the constant is error-marked, there exists a literal out of bounds error.
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in Java7Frontend/Literals.jrag at line 120
Aspect
Literals
public boolean isPositive()
Overrides:rewriteTo in class NumericLiteral

Fields

protected boolean type_computed
protected boolean constant_computed

Inherited Members

Attributes inherited from AST.NumericLiteral

Attributes inherited from AST.Literal

Attributes inherited from AST.Expr

Attributes inherited from AST.ASTNode

Methods inherited from class AST.NumericLiteral

Methods inherited from class AST.Literal

Methods inherited from class AST.Expr

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Fields inherited from AST.NumericLiteral

Fields inherited from AST.Literal

Fields inherited from AST.Expr

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value