You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parser: target module layout for splitting src/parser/mod.rs #2650
#2591 agreed on a series of pure-move PRs but did not fix the target layout. #944 and #1581 both went per-statement (~35 files, one per top-level keyword). #1581 stalled as one large
PR, and its author noted that shared helpers ended up placed arbitrarily.
Proposed layout
A flat layout mirroring src/ast/, so a struct in ast/ddl.rs is parsed in parser/ddl.rs:
src/parser/
mod.rs Parser struct, token cursor, errors, identifiers, lists, statement dispatch
expr.rs precedence climbing, prefix/infix, function calls, literals
query.rs SELECT, set ops, CTEs, FROM/joins, windows
data_type.rs
ddl.rs CREATE TABLE, columns, constraints, DROP (existing create.rs, alter.rs stay beside)
dml.rs INSERT / UPDATE / DELETE (existing merge.rs stays beside)
dcl.rs GRANT / REVOKE / roles / policies
statement.rs SHOW / SET / DECLARE / transactions / EXPLAIN / misc
Activity
LucaCappelletti94 commentedon Oct 16, 2026
Yeah a tree layout seems sensible to me.