feat(tazjin/rlox): Synchronise parser state after errors
This lets the parser collect multiple errors instead of returning after the first one, with some optimistic synchronisation after encountering something that looks wonky. Change-Id: Ie9d0ce8de9dcc7a3d1e7aa2abe15f74cab0ab96b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2236 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
This commit is contained in:
parent
1835b2be99
commit
42405bfa24
3 changed files with 67 additions and 10 deletions
|
|
@ -3,6 +3,7 @@ pub enum ErrorKind {
|
|||
UnexpectedChar(char),
|
||||
UnterminatedString,
|
||||
UnmatchedParens,
|
||||
ExpectedExpression(String),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue