OnTokenMatch

alpaca.internal.lexer.OnTokenMatch
See theOnTokenMatch companion object
trait OnTokenMatch[Ctx <: LexerCtx] extends (Token[_, Ctx, _], String, Ctx) => Unit

A hook for updating context between lexing stages.

This trait defines a function that is called after each token match to update the global context. It can be used to track line numbers, column positions, or other custom state.

Type parameters

Ctx

the global context type

Attributes

Companion
object
Experimental
true
Source
OnTokenMatch.scala
Graph
Supertypes
trait (Token[_, Ctx, _], String, Ctx) => Unit
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def curried: Token[_, Ctx, _] => String => Ctx => Unit

Creates a curried version of this function.

Creates a curried version of this function.

Attributes

Returns

a function f such that f(x1)(x2)(x3) == apply(x1, x2, x3)

Inherited from:
Function3
Source
Function3.scala
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function3 -> Any
Inherited from:
Function3
Source
Function3.scala
def tupled: ((Token[_, Ctx, _], String, Ctx)) => Unit

Creates a tupled version of this function: instead of 3 arguments, it accepts a single scala.Tuple3 argument.

Creates a tupled version of this function: instead of 3 arguments, it accepts a single scala.Tuple3 argument.

Attributes

Returns

a function f such that f((x1, x2, x3)) == f(Tuple3(x1, x2, x3)) == apply(x1, x2, x3)

Inherited from:
Function3
Source
Function3.scala

Inherited and Abstract methods

def apply(v1: Token[_, Ctx, _], v2: String, v3: Ctx): Unit

Applies the body of this function to the arguments.

Applies the body of this function to the arguments.

Attributes

Returns

the result of function application.

Inherited from:
Function3
Source
Function3.scala