pearl

Types

pub type Error {
  UnknownCharacter(character: String)
  UnterminatedString
  UnterminatedAtom
  InvalidRadix(radix: String)
  NumericSeparatorNotAllowed
  ExpectedExponent
  NumberCannotEndAfterRadix
  UnterminatedCharacter
  UnterminatedEscapeSequence
  ExpectedSigilDelimiter
  ExpectedWhitespaceAfterTripleQuote
  InvalidTripleQuotedStringIndentation(
    expected_indentation: String,
    line: String,
  )
}

Constructors

  • UnknownCharacter(character: String)
  • UnterminatedString
  • UnterminatedAtom
  • InvalidRadix(radix: String)
  • NumericSeparatorNotAllowed
  • ExpectedExponent
  • NumberCannotEndAfterRadix
  • UnterminatedCharacter
  • UnterminatedEscapeSequence
  • ExpectedSigilDelimiter
  • ExpectedWhitespaceAfterTripleQuote
  • InvalidTripleQuotedStringIndentation(
      expected_indentation: String,
      line: String,
    )
pub opaque type Lexer

Values

pub fn ignore_comments(lexer: Lexer) -> Lexer
pub fn ignore_whitespace(lexer: Lexer) -> Lexer
pub fn new(source: String) -> Lexer
pub fn to_source(tokens: List(token.Token)) -> String
pub fn tokenise(
  lexer: Lexer,
) -> #(List(token.Token), List(Error))
Search Document