Skip to content

AST: keep the written spelling of names next to the resolved FQN #452

Closed

Description

@blacktrs

Why

Names are resolved to fully-qualified form at parse time and the source spelling is lost. Rename, hover text and find-references need to know what was written and where.

Scope

  • Decide the representation: a field on name-bearing nodes, or an occurrence table on Program (span, written, resolved, kind). The table is less invasive for the node classes.
  • Cover class references, function and constant names, use declarations, namespace segments.

Acceptance

  • Every name occurrence in src/ maps back to the exact source range and written text.
  • Compiler path unchanged (dump-ast, difftest).

Design: docs/superpowers/specs/2026-10-25-lsp-foundation-design.md (Phase 1).

Activity

  1. added
    enhancement
    needs-design
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementneeds-design

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions