You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently source text fragments are stored in semantic data for a limited set of nodes. When reconstructing a source file, it would be easiest if strings were stored on child Span nodes, and the semantic data pointed to those.
For example, eohippus-fmt currently uses the Loc info from the parse tree to reconstruct leaf node strings; this works because we always read directly from disk.
However, if we're reading from a cached parse tree, the Locs don't exist any more, so we couldn't do this for formatting in the lsp, say.
So we should store strings on the leaf Span nodes and have data fields point to them instead of storing the strings directly.
The text was updated successfully, but these errors were encountered:
Currently source text fragments are stored in semantic data for a limited set of nodes. When reconstructing a source file, it would be easiest if strings were stored on child
Span
nodes, and the semantic data pointed to those.For example,
eohippus-fmt
currently uses theLoc
info from the parse tree to reconstruct leaf node strings; this works because we always read directly from disk.However, if we're reading from a cached parse tree, the
Loc
s don't exist any more, so we couldn't do this for formatting in the lsp, say.So we should store strings on the leaf
Span
nodes and have data fields point to them instead of storing the strings directly.The text was updated successfully, but these errors were encountered: