Empty
An empty lexer context with no extra state tracking.
This is the simplest context that only tracks the remaining text. Use this when you don't need line or position tracking.
Attributes
- Source
- lexer.scala
- Graph
-
- Supertypes
-
trait Serializabletrait LexerCtxtrait Selectabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Inherited methods
Structural fallback for the getter/setter refinement that ctx (see below) types itself with, so that ctx.field += 1 type-checks even when field is an immutable val. The lexer macro rewrites away every such structural access inside a rule before it is compiled, so in practice this is only a safety net; it should never be hit at runtime.
Structural fallback for the getter/setter refinement that ctx (see below) types itself with, so that ctx.field += 1 type-checks even when field is an immutable val. The lexer macro rewrites away every such structural access inside a rule before it is compiled, so in practice this is only a safety net; it should never be hit at runtime.
Attributes
- Inherited from:
- LexerCtx
- Source
- lexer.scala
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
- Source
- Product.scala
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
- Source
- Product.scala
A read-only view of the text still remaining to be tokenized.
A read-only view of the text still remaining to be tokenized.
Exposed so a custom alpaca.internal.lexer.ErrorHandling instance can inspect the character(s) that failed to match any token rule, e.g. to build a diagnostic message such as unexpected '${ctx.remainingText.charAt(0)}'.
Attributes
- Inherited from:
- LexerCtx
- Source
- lexer.scala
Inherited fields
The raw string that was matched for the last token.
The raw string that was matched for the last token.
Attributes
- Note
-
Internal API — the lexer macro reads this field at user-site, so it has to be source-visible outside the
alpacapackage. - Inherited from:
- LexerCtx
- Source
- lexer.scala
