microsoft / Trieste

A term rewriting system for experimental programming language development.
MIT License
37 stars 20 forks source link

Fix for large JSON files #122

Closed matajoh closed 2 months ago

matajoh commented 2 months ago

Very large JSON files will have residual stack values (due to the preview check) which were not clear, meaning that they could not successfully parse.

matajoh commented 2 months ago

This is why I check error ratios. The issue here was that the check for validity was passing (as the error ratio was very small, just the one mismatched braces error at the end of the file) but then when the valid file was parsed the stack had the residual braces and brackets from the previous parse and would be marked as being in error, though it wasn't. By clearing the stack the problem goes away.