Skip to content

Refactor the current structure #5

@ecoricemon

Description

@ecoricemon

Description

There are strong couplings between modules (e.g., Inference, Evaluation, and Name Resolution/path tree).
We need to decouple them.

Fix

Split each functionality into its own crate and abstract the interfaces between them.

Progress

  • syn-sem: Legacy facade and semantic analyzer that still exposes the old syntax, semantic tree, and evaluation APIs.
  • syn-sem-common: Shared infrastructure for extracted crates, including contexts, string interning, source paths/text, and virtual/physical source storage.
  • syn-sem-macros: Small procedural macro crate for extracted crates.
  • syn-sem-ast: Lifetime-bearing semantic AST layer that converts and stores syn syntax nodes for later phases.
  • syn-sem-name: AST-agnostic name-resolution model for definitions, scopes, namespaces, imports, visibility, and lookup.
  • syn-sem-pr: Program represent layer that exposes AST nodes, definitions, scopes, and others for later phases.
  • syn-sem-top: Temporary top-level orchestration crate that wires extracted phases together through TopCx::analyze and Semantics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions