Attributes
- Companion
- trait
- Experimental
- true
- Source
- lexer.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LexerCtx.type
Members list
Type members
Classlikes
The default lexer context with position and line tracking.
The default lexer context with position and line tracking.
This context tracks:
- The current column position within the line (1-based, resets on newlines)
- The current line number (1-based)
This is the most commonly used context and provides useful information for error reporting. The text field is inherited from LexerCtx.
Value parameters
- line
-
the current line number (1-based)
- position
-
the current column position within the line (1-based)
Attributes
- Companion
- object
- Source
- lexer.scala
- Supertypes
-
trait Serializabletrait LineTrackingtrait PositionTrackingtrait LexerCtxtrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Source
- lexer.scala
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
Default.type
An empty lexer context with no extra state tracking.
An empty lexer context with no extra state tracking.
This is the simplest context that only tracks the remaining text. Use this when you don't need line or position tracking.
Attributes
- Source
- lexer.scala
- Supertypes
-
trait Serializabletrait LexerCtxtrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Givens
Givens
Automatic Copyable instance for any GlobalCtx that is a Product (case class).
Automatic Copyable instance for any GlobalCtx that is a Product (case class).
Type parameters
- Ctx
-
the context type
Attributes
- Source
- lexer.scala
Default error handler for any LexerCtx that throws on the first unrecognised character.
Default error handler for any LexerCtx that throws on the first unrecognised character.
Attributes
- Source
- lexer.scala
Default OnTokenMatch implementation that updates the context after each match.
Default OnTokenMatch implementation that updates the context after each match.
This implementation:
- Updates lastRawMatched with the matched text
- Creates a new Lexeme for defined tokens
- Advances the text position
- Applies any context modifications
Attributes
- Source
- lexer.scala
