webql/compiler/lexer
Copy MarkdownTypes
Lexer
pub opaque type LexerLexerMode
pub type LexerMode {
Halt
Recover
}HaltRecoverValues
lex
pub fn lex(
lexer: Lexer,
) -> Result(List(token.Token), diagnostic.Diagnostic)Takes a lexer source and converts it to a list of tokens.
new
pub fn new(source: String) -> LexerCreates a new lexer instance from a source.
with_comments
pub fn with_comments(
lexer: Lexer,
enabled comments: Bool,
) -> LexerConfigures comments on an active lexer instance
with_mode
pub fn with_mode(lexer: Lexer, mode mode: LexerMode) -> LexerConfigures stictness on an active lexer instance.
with_whitespace
pub fn with_whitespace(
lexer: Lexer,
enabled whitespace: Bool,
) -> LexerConfigures whitespace on an active lexer instance