| Constructor and Description |
|---|
ImmutableToken(TokenType type,
Location start,
Location end,
CharSequence text,
Map<String,Object> properties) |
| Modifier and Type | Method and Description |
|---|---|
Token |
copy()
Get a copy of this token as an
ImmutableToken. |
<T> T |
get(TokenProperty<T> property)
Get some optional data for this token.
|
Location |
getEnd()
Get where this token ends.
|
Map<String,Object> |
getProperties()
Get properties as a
Map. |
Location |
getStart()
Get where this token starts.
|
String |
getText()
Get the text of the token.
|
TokenType |
getType()
Get the type of token.
|
boolean |
has(TokenProperty<?> property)
Get if this token has the given data.
|
String |
toString() |
public Location getStart()
Tokenpublic Token copy()
TokenImmutableToken.public <T> T get(TokenProperty<T> property)
Tokenpublic boolean has(TokenProperty<?> property)
Tokenpublic Map<String,Object> getProperties()
TokenMap.getProperties in interface TokenCopyright © 2018. All rights reserved.