Class TokenBuffer
java.lang.Object
io.github.protasm.jvmud.compiler.token.TokenBuffer
Immutable storage for a scanned token sequence, plus a stateful Cursor that
provides parser-friendly operations (peek/consume/mark).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classParser-facing reader over this buffer.static final classLightweight unchecked error a parser can catch at statement/decl boundaries. -
Method Summary
Modifier and TypeMethodDescriptioncursor()Start a new independent cursor at position 0.static TokenBufferBuild from a mutable list (Scanner fills it), then seal.Token<?> peekAt(int index) Stateless peek into the sealed buffer.intsize()
-
Method Details
-
of
Build from a mutable list (Scanner fills it), then seal. -
size
public int size() -
peekAt
Stateless peek into the sealed buffer. -
cursor
Start a new independent cursor at position 0.
-