LexerCtx

halotukozak.alpaca.LexerCtx
See theLexerCtx companion trait
object LexerCtx

Attributes

Companion
trait
Source
lexer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
LexerCtx.type

Members list

Type members

Classlikes

final case class Default(column: Column = ..., line: Line = ...) extends LexerCtx

The context of a lexer block without a type parameter: the Column and Line tracking fields, updated after every match. Read them as plain Ints (ctx.line, ctx.column).

The context of a lexer block without a type parameter: the Column and Line tracking fields, updated after every match. Read them as plain Ints (ctx.line, ctx.column).

In the context they are the position after the last match; in a lexeme they are the position where its token starts.

Value parameters

column

the current column within the line (1-based, in code points)

line

the current line number (1-based)

Attributes

Source
lexer.scala
Supertypes
trait Serializable
trait LexerCtx
trait Selectable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Empty() extends LexerCtx

A lexer context with no fields, so lexemes and errors carry no position. Use it when you need neither line nor column tracking.

A lexer context with no fields, so lexemes and errors carry no position. Use it when you need neither line nor column tracking.

Attributes

Source
lexer.scala
Supertypes
trait Serializable
trait LexerCtx
trait Selectable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Givens

Givens

Default error handler for any LexerCtx: stop at the first unrecognised character and report it.

Default error handler for any LexerCtx: stop at the first unrecognised character and report it.

Attributes

Source
lexer.scala