public static class LLJavaLexer3.Token<D> extends java.lang.Object implements Parser.Token<D,LLJavaLexer3.TokenType>
Modifier and Type | Method and Description |
---|---|
@Opt Location<D> |
getLocation()
Returns the source location of this token.
|
java.lang.String |
getText()
Returns the text content of this token.
|
LLJavaLexer3.TokenType |
getType()
Returns the type of this token.
|
java.lang.String |
toString() |
LLJavaLexer3.Token<D> |
withText(java.lang.String text)
Creates a variant of this token with the given text.
|
LLJavaLexer3.Token<D> |
withType(LLJavaLexer3.TokenType type)
Creates a variant of this token with the given type.
|
@Opt public @Opt Location<D> getLocation()
getLocation
in interface Parser.Token<D,LLJavaLexer3.TokenType>
null
if
not availablepublic java.lang.String getText()
getText
in interface Parser.Token<D,LLJavaLexer3.TokenType>
public LLJavaLexer3.TokenType getType()
getType
in interface Parser.Token<D,LLJavaLexer3.TokenType>
public LLJavaLexer3.Token<D> withType(LLJavaLexer3.TokenType type)
type
- a token typepublic LLJavaLexer3.Token<D> withText(java.lang.String text)
text
- a token textpublic java.lang.String toString()
toString
in class java.lang.Object
see also the complete user documentation .