Known Direct Subclasses
|
Class Overview
Common superclass for nodes representing literals (boolean, string, number, etc).
Fields
Public Constructors
public
Literal
(String payload, int pos)
Public Methods
public
static
Literal
getIntLiteral
(String numberToken, int pos, int radix)
Process the string form of a number, using the specified base if supplied and return an appropriate literal to
hold it. Any suffix to indicate a long will be taken into account (either 'l' or 'L' is supported).
Parameters
numberToken
| the token holding the number as its payload (eg. 1234 or 0xCAFE) |
radix
| the base of number |
Returns
- a subtype of Literal that can represent it
public
static
Literal
getLongLiteral
(String numberToken, int pos, int radix)
public
static
Literal
getRealLiteral
(String numberToken, int pos, boolean isFloat)