Skip to content

Refactor and document semantic analysis passes #3459

Closed
@JukkaL

Description

@JukkaL

The semantic analyzer is kind of confusing. Refactoring and documenting it better could be pretty helpful. A few ideas:

  • Document the relationships between the passes better and which things aren't valid during which passes (e.g. subtype checks or joins).
  • Rename the passes to more reasonable names. Maybe just use SemanticAnalyzerPassN as the names.
  • Consider moving the semantic analyzer passes to separate files, or at least have them in the order of the passes within the single file. Currently the second pass comes first, which is confusing.
  • Don't share SemanticAnalyzer objects with other passes. Instead refactor the shared functionality into a separate utility class and share that.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions