glexer/token

Types

pub type Token {
  Name(String)
  UpperName(String)
  DiscardName(String)
  Int(String)
  Float(String)
  String(String)
  CommentDoc(String)
  CommentNormal(String)
  CommentModule(String)
  As
  Assert
  Auto
  Case
  Const
  Delegate
  Derive
  Echo
  Else
  Fn
  If
  Implement
  Import
  Let
  Macro
  Opaque
  Panic
  Pub
  Test
  Todo
  Type
  Use
  LeftParen
  RightParen
  LeftBrace
  RightBrace
  LeftSquare
  RightSquare
  Plus
  Minus
  Star
  Slash
  Less
  Greater
  LessEqual
  GreaterEqual
  Percent
  PlusDot
  MinusDot
  StarDot
  SlashDot
  LessDot
  GreaterDot
  LessEqualDot
  GreaterEqualDot
  LessGreater
  At
  Colon
  Comma
  Hash
  Bang
  Equal
  EqualEqual
  NotEqual
  VBar
  VBarVBar
  AmperAmper
  LessLess
  GreaterGreater
  Pipe
  Dot
  DotDot
  LeftArrow
  RightArrow
  EndOfFile
  Space(String)
  UnterminatedString(String)
  UnexpectedGrapheme(String)
}

Constructors

  • Name(String)
  • UpperName(String)
  • DiscardName(String)
  • Int(String)
  • Float(String)
  • String(String)
  • CommentDoc(String)
  • CommentNormal(String)
  • CommentModule(String)
  • As
  • Assert
  • Auto
  • Case
  • Const
  • Delegate
  • Derive
  • Echo
  • Else
  • Fn
  • If
  • Implement
  • Import
  • Let
  • Macro
  • Opaque
  • Panic
  • Pub
  • Test
  • Todo
  • Type
  • Use
  • LeftParen
  • RightParen
  • LeftBrace
  • RightBrace
  • LeftSquare
  • RightSquare
  • Plus
  • Minus
  • Star
  • Slash
  • Less
  • Greater
  • LessEqual
  • GreaterEqual
  • Percent
  • PlusDot
  • MinusDot
  • StarDot
  • SlashDot
  • LessDot
  • GreaterDot
  • LessEqualDot
  • GreaterEqualDot
  • LessGreater
  • At
  • Colon
  • Comma
  • Hash
  • Bang
  • Equal
  • EqualEqual
  • NotEqual
  • VBar
  • VBarVBar
  • AmperAmper
  • LessLess
  • GreaterGreater
  • Pipe
  • Dot
  • DotDot
  • LeftArrow
  • RightArrow
  • EndOfFile
  • Space(String)
  • UnterminatedString(String)
  • UnexpectedGrapheme(String)

Functions

pub fn to_source(tok: Token) -> String

Turn a token back into its Gleam source representation.

Search Document