-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abort expression formats incorrectly #829
Comments
DylanRJohnston
changed the title
Abort expression prints incorrectly
Abort expression formats incorrectly
May 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: