Properly restore snapshot when failing to recover parsing ternary
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user