halotukozak.alpaca.Token
See theToken companion object
What Token["NAME"] and Token["NAME"](value) return inside a lexer block: a marker the lexer macro reads to define a token. It exists only at compile time and cannot be created or extended outside the library.
The token a lexer defines is read as MyLexer.NAME, and its type is named the same way: val t: MyLexer.NAME = MyLexer.NAME. In a parser, MyLexer.NAME(lexeme) matches one; as a type, a token can be a SeparatedBy separator, and in resolutions(...) it can be ordered against productions.
Type parameters
- Ctx
-
the lexer context type
- Name
-
the token's name
- Value
-
the type of the value its lexemes carry
Attributes
- Companion
- object
- Source
- lexer.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class IgnoredToken[Ctx]
In this article
