cel/parser/lexer

Types

pub opaque type Lexer
pub type Position {
  Position(byte_offset: Int, byte_size: Int)
}

Constructors

  • Position(byte_offset: Int, byte_size: Int)
pub type Token {
  Ident(String)
  Int(String)
  UInt(String)
  Float(String)
  String(String)
  Bytes(BitArray)
  Bool(Bool)
  Null
  Plus
  Minus
  Star
  Slash
  Percent
  LessThan
  LessThanEq
  GreaterThan
  GreaterThanEq
  Equals
  NotEquals
  In
  Or
  And
  LeftParen
  RightParen
  LeftCurly
  RightCurly
  LeftSquare
  RightSquare
  At
  Dot
  Colon
  SemiColon
  Comma
  ExclamationMark
  Hash
  QuestionMark
  Comment(String)
  Whitespace(String)
  EndOfFile
  Reserved(String)
  UnterminatedString(String)
  UnterminatedBytes(BitArray)
  UnexpectedGrapheme(String)
  InvalidByteLiteral(String)
}

Constructors

  • Ident(String)
  • Int(String)
  • UInt(String)
  • Float(String)
  • String(String)
  • Bytes(BitArray)
  • Bool(Bool)
  • Null
  • Plus
  • Minus
  • Star
  • Slash
  • Percent
  • LessThan
  • LessThanEq
  • GreaterThan
  • GreaterThanEq
  • Equals
  • NotEquals
  • In
  • Or
  • And
  • LeftParen
  • RightParen
  • LeftCurly
  • RightCurly
  • LeftSquare
  • RightSquare
  • At
  • Dot
  • Colon
  • SemiColon
  • Comma
  • ExclamationMark
  • Hash
  • QuestionMark
  • Comment(String)
  • Whitespace(String)
  • EndOfFile
  • Reserved(String)
  • UnterminatedString(String)
  • UnterminatedBytes(BitArray)
  • UnexpectedGrapheme(String)
  • InvalidByteLiteral(String)

Functions

pub fn discard_comments(lexer: Lexer) -> Lexer
pub fn discard_whitespace(lexer: Lexer) -> Lexer
pub fn lex(lexer: Lexer) -> List(#(Token, Position))
pub fn new(source: String) -> Lexer
Search Document