public final class Token extends Object
| Modifier and Type | Field and Description |
|---|---|
TokenType |
type
The type of this token.
|
String |
value
The text of the token exactly as it appears in the source code.
|
public final TokenType type
Strictly speaking, this field is redundant, because the token type can always be deduced from the token
value, e.g. iff the value begins with "'", then the type is TokenType.CHARACTER_LITERAL.
Copyright © 2019. All rights reserved.