Properly restore snapshot when failing to recover parsing ternary
This commit is contained in:
parent
056f5b0f13
commit
041f0313cf
3 changed files with 20 additions and 9 deletions
|
@ -1454,13 +1454,11 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
Err(err) => {
|
||||
err.cancel();
|
||||
self.restore_snapshot(snapshot);
|
||||
}
|
||||
};
|
||||
}
|
||||
} else {
|
||||
self.restore_snapshot(snapshot);
|
||||
};
|
||||
}
|
||||
self.restore_snapshot(snapshot);
|
||||
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue