public interface Token
| 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.
|
TokenType getType()
String getText()
Location getStart()
Location getEnd()
<T> T get(TokenProperty<T> property)
property - boolean has(TokenProperty<?> property)
property - Token copy()
ImmutableToken.Copyright © 2018. All rights reserved.