tools
tools copied to clipboard
feat(rome_json_parser): first version of json parser
Summary
- Part of #2786
- Implementing JSON parser with easy error recovery.
- Adding basic errory recover for
trailing comma
- Adding some valid basic JSON test cases copy from
prettier
json test case - Adding some invalid
trailing comma
test cases - Extracting common parser logic into a new crate
rome_parse
Test Plan
- cargo test
- Check if the new generated
*.rast
is correct.
Have you tested this parser with any open source JSON test suites? For example: https://github.com/nst/JSONTestSuite
EDIT: I see you included some from Prettier. Are these tests comprehensive?
Have you tested this parser with any open source JSON test suites? For example: https://github.com/nst/JSONTestSuite
Not yet. (only use prettier json test case.)
The rome member suggested me to use https://github.com/rome/tools/blob/archived-js/internal/codec-config/json/parser-test262.test.ts instead prettier test case, so I think I would like to use rome
classic json test case.
Also, thanks for sharing the json test case repo
This PR is stale because it has been open 14 days with no activity.