Closed
Description
Here are some approaches to testing correctness of parsing and pretty printing
- Hand written unit test
- Use the unstable nightly
-Z
option for outputting a JSON of the AST, parse that JSON into our AST and diff them against the AST we get from regular parsing. - Parse, pretty print, re-parse it, and check that the two ASTs match.
- Re-parse spanned sub-elements from the substring of the input, and check that the two ASTs match.
Metadata
Metadata
Assignees
Labels
No labels