AST
node type LongLiteral

General Info

Production
LongLiteral : 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.LongLiteral
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Java long integer literal. Can store any number that fits in 64 bits of data, or less.
Source
Declared in Java7Frontend/Literals.ast at line 54

Member Filters

API level:

Aspect:

Constructors

public LongLiteral()
 
public LongLiteral(java.lang.String p0)
 
public LongLiteral(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 301
Aspect
TypeAnalysis
Parse this literal and return a fresh Constant.
Overrides:constant in class Literal
Returns:
a fresh Constant representing this LongLiteral
Source
Declared in Java7Frontend/Literals.jrag at line 161
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 LongLiteral clone()
                  throws java.lang.CloneNotSupportedException
Overrides:clone in class NumericLiteral
Throws:
java.lang.CloneNotSupportedException
public LongLiteral copy()
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,
                        long value)
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 495
Aspect
CodeGeneration
Overrides:emitPushConstant in class Literal
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 566
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 toString(java.lang.StringBuffer s)
Defer pretty printing to superclass.
Overrides:toString in class Literal
Source
Declared in Java7Frontend/Literals.jrag at line 98
Aspect
Literals
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 130
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