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
I'm currently working on a transpiler from another language into VRL. All other parts of the AST implement Display in a way that is valid syntactically to parse it again i.e. parse <-> display (formatting not withstanding). However the implementation of Display for abort incorrectly places a colon in its output.
I don't know if this kind of isomorphism via std::fmt::Display is a guarantee the project is looking to provide, but beyond transpilers it's also very useful for pretty printers since printing from the parsed AST canonicalizes the formatting.
The text was updated successfully, but these errors were encountered:
DylanRJohnston
changed the title
Abort expression prints incorrectly
Abort expression formats incorrectly
May 7, 2024
Hey all,
I'm currently working on a transpiler from another language into VRL. All other parts of the AST implement Display in a way that is valid syntactically to parse it again i.e. parse <-> display (formatting not withstanding). However the implementation of Display for
abort
incorrectly places a colon in its output.https://github.com/vectordotdev/vrl/blame/b6fd5ecf3e4d75ccc5a822dcebe8a0fe7d04ef78/src/parser/ast.rs#L1199
The following kind of test succeeds for all other expressions in VRL.
I don't know if this kind of isomorphism via
std::fmt::Display
is a guarantee the project is looking to provide, but beyond transpilers it's also very useful for pretty printers since printing from the parsed AST canonicalizes the formatting.The text was updated successfully, but these errors were encountered: