Signo.Token (Signo v0.0.2)
View SourceA token.
Summary
Types
The value of the literal as an elixir term/0
.
Example: 30_000
.
@type t() :: %Signo.Token{ lexeme: binary(), pos: Signo.Position.t(), type: type() | :error }
A token.
Has the following fields:
type
: the type of token, seetype/0
.lexeme
: the string as found in the source code.pos
: theSigno.Position
where the source string was found.
@type type() :: :eof | :opening | :closing | :quote | :symbol | {:literal, literal()}
Functions
@spec new(type(), binary(), Signo.Position.t()) :: t()