glexer

Types

pub opaque type Lexer
pub type NumberLexerMode {
  LexInt
  LexFloat
  LexFloatExponent
}

Constructors

  • LexInt
  • LexFloat
  • LexFloatExponent
pub type Position {
  Position(byte_offset: Int)
}

Constructors

  • Position(byte_offset: Int)

Functions

pub fn iterator(lexer: Lexer) -> Iterator(#(Token, Position))
pub fn lex(lexer: Lexer) -> List(#(Token, Position))
pub fn new(source: String) -> Lexer
pub fn next(lexer: Lexer) -> #(Lexer, #(Token, Position))
pub fn take_content(
  source: String,
  content: String,
  predicate: fn(String) -> Bool,
) -> #(String, String)
Search Document