Skip to content

AST pretty-printing is broken for nodes containing interned strings #85

Description

@y21

AST nodes can be pretty-printed via their Display impl and should output surface-looking javascript.
At some point string interning was introduced, which means that it now requires access to &StringInterner to be able to get a &str out of a Symbol, which effectively broke these impls (because the impls do not have access and there is no way to pass it as a parameter).

This is currently worked around by simply outputting their ID instead of the string data but this is not very useful.

function <interned id: 248>(<interned id: 249>) {
  return <interned id: 249> * <interned id: 249>
}

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions