apollo-rs
apollo-rs copied to clipboard
Error recovery in the parser
The parser does its best with any invalid input it gets. We have a few cases where it could be better.
type A {
field1: Int
|||garbage|||
field2: Int
}
A parse error on line 3 here causes the parser to "unwind" all the way back to the root node before continuing to parse. Here the ideal way to do it would be to eat the garbage and continue parsing the fields definition.
(add more examples as necessary?)