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
Deserialization is hard. The tree is deduplicated, so deserialization either reduplicates the tree (the way it is in the serialized form) or needs to thread context through in a difficult manner.
Additionally, Rowan is a library for textual parse trees. You already have a nice serialized format -- the text you're parsing -- and a way to convert that format into the tree. The tree contains the full text that you're parsing, so the serialized tree is strictly larger and contains more redundant information than the text that produced it. Even with the additional redundant information, parsing the tree from a tree serialization is likely not measurably faster than a well-written parser for the original text.
The serde serialization support exists mostly as a convenient simple way to perform snapshot testing (or a similar functionality) on the parsed trees that's (potentially) more readable, diffable, and useful than the debug output.
I'm in grad school now so have very little time to spend on open source work currently. But if I find time, I do want to work on getting sorbus integrated into rowan (as the green tree design is better and enables faster "syntax pointers"), at which point it will be possible to get deserialization by asking sorbus for it. (But likely not Rowan, as, again, there's little reason Rowan sees for deserialization of a tree.)
I found no deserialization in feature serde1. Could this be added, please?
The text was updated successfully, but these errors were encountered: