Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bug: incorrect AST produced for nested namespaces #4966

Copy link
Copy link
Closed
@bradzacher

Description

@bradzacher
Issue body actions

This was forgotten when we worked around #2573

For namespace foo { namespace bar {} } we produce the following AST:
TSModuleDeclaration[id = foo] > TSModuleBlock > TSModuleDeclaration[id = bar] > TSModuleBlock

For namespace foo.bar {} produces the following AST:
TSModuleDeclaration[id = foo] > TSModuleDeclaration[id = bar] > TSModuleBlock

The AST we produce is driven by the AST TS produces - they emit the nested module declaration, so our code does as well.
Ultimately however is pretty incorrect and does not correctly represent the code as written.

Instead we should emit an EntityName, thus allowing TSQualifiedName in the .id:
TSModuleDeclaration[id = foo.bar] > TSModuleBlock

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structurePRs and Issues about the AST structureaccepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedThis change will require a new major version to be releasedbugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.