LineTracking

alpaca.internal.lexer.LineTracking
See theLineTracking companion object
trait LineTracking extends LexerCtx

A trait for contexts that track line numbers.

This trait adds line number tracking to a lexer context. The line number is incremented each time a newline character is matched.

Attributes

Companion
object
Experimental
true
Source
LineTracking.scala
Graph
Supertypes
trait LexerCtx
class Object
trait Matchable
class Any
Known subtypes
class Default
Self type
Product

Members list

Value members

Abstract fields

var line: Int

The current line number (1-based).

The current line number (1-based).

Attributes

Source
LineTracking.scala

Inherited fields

var lastLexeme: Lexeme[_, _] | Null

The last lexeme that was created.

The last lexeme that was created.

Attributes

Inherited from:
LexerCtx
Source
lexer.scala
var lastRawMatched: String

The raw string that was matched for the last token.

The raw string that was matched for the last token.

Attributes

Inherited from:
LexerCtx
Source
lexer.scala

Inherited and Abstract fields

var text: CharSequence

The remaining text to be tokenized.

The remaining text to be tokenized.

Attributes

Inherited from:
LexerCtx
Source
lexer.scala