Skip to content

Refactor: Parse - #449

Merged
LesterEvSe merged 16 commits into
BlockstreamResearch:masterfrom
LesterEvSe:refactor/parse
Oct 23, 2026
Merged

LesterEvSe merged 16 commits into
BlockstreamResearch:masterfrom
LesterEvSe:refactor/parse

Conversation

@LesterEvSe

@LesterEvSe LesterEvSe commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

parse.rs had grown to approximately 4 500 lines. this PR splits it into smaller files. There is no change in behavior or public API.

src/parse/
├── mod.rs              parse tree node types (Program, Expression, Call, ...), their accessors, ExprTree
├── pipeline.rs         ParseFromStr, ParseFromStrWithErrors: prescan, lex, parse, feature check
├── display.rs          Display impls for the parse tree
├── lossless.rs         ParsedSource and parse_with_errors_for_fmt, for formatters (feature "fmt")
├── arbitrary_impls.rs  Arbitrary impls for fuzzing (feature "arbitrary")
├── grammar/
│   ├── mod.rs          the ChumskyParse trait, identifier parsers, shared recovery helpers
│   ├── program.rs      Program, items, functions, use declarations, modules
│   ├── types.rs        AliasedType, TypeAlias, EnumDeclaration
│   ├── statement.rs    Statement, Assignment, Pattern
│   ├── expression.rs   Expression, SingleExpression, EnumConstruction
│   ├── call.rs         Call, CallName
│   └── matching.rs     MatchPattern, Match, EnumMatch
└── tests/              parser tests for the regular and the lossless (fmt) entry points

Checklist

  • New or changed language features are used in fixtures/kitchen_sink.simf (see its header).

@LesterEvSe
LesterEvSe requested a review from KyrylR October 22, 2026 12:37
@LesterEvSe LesterEvSe self-assigned this Oct 22, 2026
@LesterEvSe
LesterEvSe requested a review from delta1 as a code owner October 22, 2026 12:37

@KyrylR KyrylR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 258e027; successfully ran local tests

Ran tests and CI on every commit

@LesterEvSe
LesterEvSe merged commit d199b87 into BlockstreamResearch:master Oct 23, 2026
14 checks passed
@LesterEvSe

LesterEvSe commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Since it is a refactoring without any API changes, we merged it as it is.
This will help us continue our work on errors: https://community.simplicity-lang.org/t/simplicityhl-now-reports-more-than-one-error-per-run/94

@LesterEvSe
LesterEvSe deleted the refactor/parse branch October 23, 2026 11:11
@apoelstra

Copy link
Copy Markdown
Contributor

Guys, please don't merge 10000 line diffs without any input from me.

@LesterEvSe

Copy link
Copy Markdown
Collaborator Author

Ok, sorry for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants