dash icon indicating copy to clipboard operation
dash copied to clipboard

AST pretty-printing is broken for nodes containing interned strings

Open y21 opened this issue 1 year ago • 0 comments

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>
}

y21 avatar May 04 '24 21:05 y21