Empty

halotukozak.alpaca.LexerCtx.Empty
final case class Empty() extends LexerCtx

A lexer context with no fields, so lexemes and errors carry no position. Use it when you need neither line nor column tracking.

Attributes

Source
lexer.scala
Graph
Supertypes
trait Serializable
trait LexerCtx
trait Selectable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

inline def applyDynamic(inline name: String)(inline args: Any*): Any

Not meant to be called: assigning a context field outside a lexer rule or handler is a compile error.

Not meant to be called: assigning a context field outside a lexer rule or handler is a compile error.

Attributes

Inherited from:
LexerCtx
Source
lexer.scala
final def peek(n: Int): String

A copy of at most the next n characters of the input still to be tokenized, fewer at its end.

A copy of at most the next n characters of the input still to be tokenized, fewer at its end.

Meant for a custom ErrorHandling instance to look at what failed to match any token rule, e.g. to pick a recovery strategy based on what comes next. Only the requested characters are read and copied, and the result is safe to keep after the callback returns.

Value parameters

n

the maximum number of characters to return

Attributes

Throws
IllegalArgumentException

if n is negative

Inherited from:
LexerCtx
Source
lexer.scala
def productElementNames: Iterator[String]

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
def productIterator: Iterator[Any]

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