datalust / superpower

A C# parser construction toolkit with high-quality error reporting
Apache License 2.0
1.05k stars 98 forks source link

Fix the JSON parser sample to allow strings ending in '\'. #115

Closed fvbommel closed 4 years ago

fvbommel commented 4 years ago

I noticed the tokenizer in the JSON sample would fail to parse strings like "foo\\".

This fixes that by not looking specifically for \" but instead ignoring any character preceded by a \ which ensures it won't be allowed to escape the ending quote if it's another \.

nblumhardt commented 4 years ago

Thanks!