Package eu.bandm.tools.lljava.parser
Class LLJavaLexer.Token<D>
java.lang.Object
eu.bandm.tools.lljava.parser.LLJavaLexer.Token<D>
- Type Parameters:
D
- the type of source document identifiers
- All Implemented Interfaces:
Token<D,
LLJavaLexer.TokenType>
- Enclosing class:
- LLJavaLexer<D>
Immutable LLJava tokens.
-
Method Summary
-
Method Details
-
getLocation
Returns the source location of this token.The default implementation returns
null
.- Specified by:
getLocation
in interfaceToken<D,
LLJavaLexer.TokenType> - Returns:
- the source location of this token, or
null
if not available.
-
getText
Returns the text content of this token.The default implementation returns
null
.- Specified by:
getText
in interfaceToken<D,
LLJavaLexer.TokenType> - Returns:
- the text content of this token, or
null
if not available.
-
getType
Returns the type of this token.- Specified by:
getType
in interfaceToken<D,
LLJavaLexer.TokenType> - Returns:
- the type of this token.
-
withType
Creates a variant of this token with the given type.- Specified by:
withType
in interfaceToken<D,
LLJavaLexer.TokenType> - Parameters:
type
- a token type- Returns:
- a new token with the same location and text, and the new type.
-
withText
Creates a variant of this token with the given text.- Parameters:
text
- a token text- Returns:
- a new token with the same location and type, and the new text.
-
toString
-