ruff
c0c065f1 - Remove deprecated parsing list functions (#10271)

Commit
1 year ago
Remove deprecated parsing list functions (#10271) ## Summary This PR removes the deprecated parsing list functions and updates the references to use the new functions. There are now 4 functions to accommodate this pattern. They are divided into 2 groups: one to parse a sequence of elements and the other to parse a sequence of elements _separated_ by a comma. In each of the groups, there are 2 functions: one collects and returns all the parsed elements as a vector and the other delegates the collection part to the user. This separation is achieved by using `Fn` and `FnMut` to allow mutation in the later case. The error recovery context has been updated to accommodate the new sequence kind. Currently, the terminator token kinds only contain the necessary token to end the list and not necessarily the ones which might help in error recovery. This will be updated as I go through the testing phase. This phase is basically coming up with a bunch of invalid programs to check how the parser is acting and how can we help in the recovery phase. ## Test Plan Currently, my plan is to keep the testing part separate than the actual update. This doesn't mean I'm not testing locally, but it's not thorough. The main reason is to keep the diffs to a minimal and writing test cases will require some effort which I want to decouple with the actual change. This is ok here as it's not getting merged into `main` but the parser PR.
Author
Parents
Loading