View Source AyeSQL.Lexer (AyeSQL v1.1.3)

This module defines the lexer for the AyeSQL language.

Summary

Types

Column number.

Line number.

Location.

Lexer option.

Lexer options.

Original match from the string.

Token.

Token name.

Tokens.

Token value.

Functions

Gets tokens from the contents of a string.

Types

@type column() :: pos_integer()

Column number.

@type line() :: pos_integer()

Line number.

@type location() :: {line(), column()}

Location.

@type option() :: {:error_context, pos_integer()} | {:filename, Path.t()}

Lexer option.

@type options() :: [option()]

Lexer options.

@type original() :: binary()

Original match from the string.

@type token() :: {token_name(), line(), {value(), original(), location()}}

Token.

@type token_name() :: :"$name" | :"$docs" | :"$fragment" | :"$named_param"

Token name.

@type tokens() :: [token()]

Tokens.

@type value() :: binary()

Token value.

Functions

Link to this function

tokenize(contents, options \\ [])

View Source
@spec tokenize(binary(), options()) :: tokens() | no_return()

Gets tokens from the contents of a string.