Strategy

alpaca.internal.lexer.ErrorHandling.Strategy
enum Strategy

Attributes

Source
ErrorHandling.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case IgnoreChar extends Strategy

Skips the single current character that failed to match any token and continues.

Skips the single current character that failed to match any token and continues.

Attributes

Source
ErrorHandling.scala
case IgnoreToken extends Strategy

Skips the entire sequence that failed to match and continues from the next successful match. If the match is not found, it skips the current character.

Skips the entire sequence that failed to match and continues from the next successful match. If the match is not found, it skips the current character.

Attributes

Source
ErrorHandling.scala
case Stop extends Strategy

Gracefully stops tokenization at the current position, returning the lexemes collected so far.

Gracefully stops tokenization at the current position, returning the lexemes collected so far.

Attributes

Source
ErrorHandling.scala
final case class Throw(ex: Exception)

Throws the given exception, aborting tokenization immediately.

Throws the given exception, aborting tokenization immediately.

Attributes

Source
ErrorHandling.scala