Expand description
Error-resilient, event-based recursive-descent parser for Snowflake SQL.
parse turns source text into a lossless rowan CST plus a list of ParseErrors.
Parsing never fails: malformed input is wrapped in ERROR nodes and recovery continues, so
the tree always round-trips byte-for-byte (the basis for formatting and highlighting).
§Pipeline
tokenize → [input::Input] → [parser::Parser] (emits events) → [builder::build_tree].
§Modules
event/input/parser/grammar/builder— the parsing pipeline.ast— typed accessors over the untyped tree.
Structs§
- From
Clause - Parse
- The result of parsing: a lossless green tree plus any diagnostics.
- Parse
Error - A diagnostic produced while parsing, located at a byte span into the source.
- Select
Item - Select
List - Select
Stmt - Source
File - Where
Clause
Enums§
- Dialect
- The SQL dialect a lex/parse/format request targets.
- Syntax
Kind - Every lexical token kind and syntax node kind understood by sql-dialect-fmt.
Traits§
- AstNode
- A typed view of a CST node of a particular kind.
Functions§
- parse
- Parse Snowflake SQL source into a lossless CST. Never panics; never loses input.
- parse_
with_ dialect - Parse
textasdialectinto a lossless CST. Never panics; never loses input.