Skip to content

Refactor: AST - #442

Merged
LesterEvSe merged 17 commits into
BlockstreamResearch:masterfrom
LesterEvSe:refactor/ast
Oct 15, 2026
Merged

LesterEvSe merged 17 commits into
BlockstreamResearch:masterfrom
LesterEvSe:refactor/ast

Conversation

@LesterEvSe

Copy link
Copy Markdown
Collaborator

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

Structure

src/ast/
├── mod.rs           AST node types (Program, Expression, Call, ...) and their accessors
├── jet_hinter.rs    JetHinter trait, ElementsJetHinter, CoreJetHinter
├── recovery.rs      Failure and the rule for which errors are suppressed (multi-error)
├── scope/
│   ├── mod.rs       Scope: variables, modules, witnesses, parameters, diagnostics
│   └── imports.rs   resolution of `use` declarations
├── analyze/
│   ├── mod.rs       the AbstractSyntaxTree trait
│   ├── program.rs   Program, items, functions
│   ├── statement.rs Statement, Assignment
│   ├── expression.rs Expression, SingleExpression
│   ├── call.rs      Call, CallName
│   └── matching.rs  Match, EnumMatch, EnumConstruction
└── tests/           tests that check source in -> errors out

Checklist

  • If this PR adds or changes a language feature, it is used in
    examples/kitchen_sink.simf, and test-data/kitchen_sink.json is
    regenerated.

@LesterEvSe
LesterEvSe requested a review from KyrylR October 14, 2026 10:47
@LesterEvSe LesterEvSe self-assigned this Oct 14, 2026
@LesterEvSe
LesterEvSe requested a review from delta1 as a code owner October 14, 2026 10:47

@apoelstra apoelstra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 63b23e5; successfully ran local tests; this is great!

@LesterEvSe
LesterEvSe merged commit 131820f into BlockstreamResearch:master Oct 15, 2026
14 checks passed
@LesterEvSe
LesterEvSe deleted the refactor/ast branch October 19, 2026 10:47
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.

2 participants