Package io.karatelabs.parser
Class Token
java.lang.Object
io.karatelabs.parser.Token
Lightweight token using flyweight pattern. Core fields (pos, line, col, type, length)
are stored directly for performance. Resource and rarely-used data (comments, prev/next)
are accessed via TokenBuffer.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionToken(TokenBuffer buffer, TokenType type, int pos, int line, int col, int length) Token(TokenBuffer buffer, TokenType type, int pos, short line, short col, short length) -
Method Summary
-
Field Details
-
EMPTY
-
pos
public final int pos -
line
public final short line -
col
public final short col -
type
-
length
public final short length
-
-
Constructor Details
-
Token
-
Token
-
-
Method Details