Skip to content

[ARCHIVE] Typed-expression AST infrastructure (saved for future revival) - #4

Open
milyin wants to merge 1 commit into
mainfrom
archive/ast-infrastructure
Open

[ARCHIVE] Typed-expression AST infrastructure (saved for future revival)#4
milyin wants to merge 1 commit into
mainfrom
archive/ast-infrastructure

Conversation

@milyin

@milyin milyin commented Aug 6, 2026

Copy link
Copy Markdown
Owner

[ARCHIVE] Typed-expression AST infrastructure — saved for future revival

This PR is not intended to be merged. It preserves the typed-expression
AST / expr module that was removed from main in #2, so the work is easy to
find, review, and revive later.

Why a separate archive PR

The AST was part of the codebase since the initial import, so a PR from the
original pre-cleanup branch (backup/before-cleanup) shows an almost-empty
diff — GitHub diffs against the merge-base, which already contained the AST.
To make the infrastructure actually visible as a diff, this branch restores
those files on top of the current (AST-free) main, yielding a clean additive
diff of ~3.6k lines.

What's here

Restores the full typed-expression layer:

  • src/expr.rs, src/expr/render.rs, src/expr/tests.rs — the AST model,
    renderer, and its test suite
  • Pre-cleanup versions of model.rs, slot.rs, render.rs, lib.rs,
    file.rs, code.rs, and tests that integrated the AST

Key types being preserved: ExprArena, KtExpr, KtStmt, KtLambda,
KtLiteral, KtPattern, KtName, BindingId/ArenaId, Binder,
ExprSlot<T>, Ast<T>, AnnotationSlot/KtAnnotation, KtAccessor, and
KtFun::typed_body.

Caveats (archive, not mergeable)

  • It reverts the Kt-prefix renames and the overload-validation change that
    now live on main for the affected files. Reviving this work means
    re-integrating the expr module on top of current main, not merging as-is.
  • Tests/mergeability were intentionally not reconciled.

Raw pre-cleanup source is also preserved on branch backup/before-cleanup.

Companion to #2 (the cleanup that removed this infrastructure).

Snapshot of the typed-expression AST/expr infrastructure that was removed
from main in PR #2 (commit 1f2c224). Restored on top of current main so the
diff shows the full infrastructure as an additive change for future revival.

This branch is an archive only and is NOT intended to be merged: it does not
reconcile with the Kt-prefix renames or the overload-validation change that
now live on main. To revive this work, cherry-pick or re-integrate the expr
module and its bindings on top of the current model.

Raw pre-cleanup source is also preserved on branch backup/before-cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant