lexer

Types

pub type LexerError {
  UnexpectedCharacter(
    message: String,
    position: positioned.Position,
  )
  UnexpectedFormat(
    message: String,
    position: positioned.Position,
  )
}

Constructors

pub type Token {
  And
  All
  AllInside
  AnyInside
  As
  Assert
  By
  Contains
  ContainsNot
  ContainsAll
  ContainsAny
  ContainsNone
  Count
  Create
  Default
  Define
  Delete
  Desc
  Else
  End
  Field
  Fields
  Flexible
  From
  Group
  If
  In
  Index
  Inside
  Intersect
  Is
  Limit
  NoneInside
  Not
  NotInside
  Normal
  On
  Only
  Or
  Order
  Out
  Outside
  Permissions
  Relation
  Relate
  Schemafull
  Select
  Set
  Table
  Then
  Type
  Unique
  Update
  Value
  Where
  Full
  None
  Asterisk
  AsteriskEqual
  AsteriskTilde
  DoubleAsterisk
  Comma
  Semicolon
  Pipe
  Colon
  DoubleColon
  LeftParenthesis
  RightParenthesis
  RightAngle
  LeftAngle
  RightAngleEqual
  LeftAngleEqual
  Equal
  DoubleEqual
  LeftCurlyBracket
  RightCurlyBracket
  Dot
  LeftBracket
  LeftArrow
  LeftRightArrow
  RightBracket
  RightArrow
  DoubleAmpersand
  DoublePipe
  Bang
  DoubleBang
  BangEqual
  BangTilde
  DoubleQuestion
  QuestionColon
  QuestionTilde
  Tilde
  Plus
  Multiply
  Slash
  Divide
  Parameter(String)
  Identifier(String)
  Reference(String, String)
  String(String)
  Number(Float)
}

Constructors

  • And
  • All
  • AllInside
  • AnyInside
  • As
  • Assert
  • By
  • Contains
  • ContainsNot
  • ContainsAll
  • ContainsAny
  • ContainsNone
  • Count
  • Create
  • Default
  • Define
  • Delete
  • Desc
  • Else
  • End
  • Field
  • Fields
  • Flexible
  • From
  • Group
  • If
  • In
  • Index
  • Inside
  • Intersect
  • Is
  • Limit
  • NoneInside
  • Not
  • NotInside
  • Normal
  • On
  • Only
  • Or
  • Order
  • Out
  • Outside
  • Permissions
  • Relation
  • Relate
  • Schemafull
  • Select
  • Set
  • Table
  • Then
  • Type
  • Unique
  • Update
  • Value
  • Where
  • Full
  • None
  • Asterisk
  • AsteriskEqual
  • AsteriskTilde
  • DoubleAsterisk
  • Comma
  • Semicolon
  • Pipe
  • Colon
  • DoubleColon
  • LeftParenthesis
  • RightParenthesis
  • RightAngle
  • LeftAngle
  • RightAngleEqual
  • LeftAngleEqual
  • Equal
  • DoubleEqual
  • LeftCurlyBracket
  • RightCurlyBracket
  • Dot
  • LeftBracket
  • LeftArrow
  • LeftRightArrow
  • RightBracket
  • RightArrow
  • DoubleAmpersand
  • DoublePipe
  • Bang
  • DoubleBang
  • BangEqual
  • BangTilde
  • DoubleQuestion
  • QuestionColon
  • QuestionTilde
  • Tilde
  • Plus
  • Multiply
  • Slash
  • Divide
  • Parameter(String)
  • Identifier(String)
  • Reference(String, String)
  • String(String)
  • Number(Float)

Values

pub fn render_error(error: LexerError, content: String) -> String
pub fn split_statements(tokens: List(Token)) -> List(List(Token))
pub fn tokenize(
  file: String,
  input: String,
) -> Result(List(positioned.Positioned(Token)), LexerError)
✨ Search Document