Token

halotukozak.alpaca.Token
See theToken companion object
class Token[+Name <: ValidName, +Ctx <: LexerCtx, +Value]

Defines an opaque type Token that represents a token used in a lexer.

This type has three type parameters:

  • Name: The type of the token's name, restricted to a subtype of ValidName.
  • Ctx: The type of the lexer context, restricted to a subtype of LexerCtx.
  • Value: The type of the token's value.

The exact implementation details of the underlying type are abstracted away by using Any. Opaque types provide type safety without exposing the underlying representation.

Attributes

Companion
object
Experimental
true
Source
lexer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class IgnoredToken[Ctx]
In this article