Token
Factory methods for creating token definitions in the lexer DSL.
Attributes
- Experimental
- true
- Source
- lexer.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Token.type
Members list
Value members
Concrete methods
Creates an ignored token that will be matched but not included in the output.
Creates an ignored token that will be matched but not included in the output.
This is compile-time only and should only be used inside lexer definitions.
Value parameters
- ctx
-
the lexer context
Attributes
- Returns
-
a token that will be ignored
- Source
- lexer.scala
Creates a token that captures the matched string.
Creates a token that captures the matched string.
This is compile-time only and should only be used inside lexer definitions.
Type parameters
- Name
-
the token name
Value parameters
- ctx
-
the lexer context
Attributes
- Returns
-
a token definition
- Source
- lexer.scala
Creates a token with a custom value extractor.
Creates a token with a custom value extractor.
This is compile-time only and should only be used inside lexer definitions.
Type parameters
- Name
-
the token name
Value parameters
- ctx
-
the lexer context
- value
-
the value to extract from the match
Attributes
- Returns
-
a token definition
- Source
- lexer.scala
