Class Lexer.Token
java.lang.Object
com.github.zafarkhaja.semver.expr.Lexer.Token
- Enclosing class:
Lexer
This class holds the information about lexemes in the input stream.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enum
Valid token types. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final String
The lexeme of this token.(package private) final int
The position of this token.(package private) final Lexer.Token.Type
The type of this token. -
Constructor Summary
ConstructorsConstructorDescriptionToken
(Lexer.Token.Type type, String lexeme, int position) Constructs aToken
instance with the type, lexeme and position. -
Method Summary
-
Field Details
-
type
The type of this token. -
lexeme
The lexeme of this token. -
position
final int positionThe position of this token.
-
-
Constructor Details
-
Token
Token(Lexer.Token.Type type, String lexeme, int position) Constructs aToken
instance with the type, lexeme and position.- Parameters:
type
- the type of this tokenlexeme
- the lexeme of this tokenposition
- the position of this token
-
-
Method Details