mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Fix shorthand parsing pushing declarations when parse_entirely returns Err
This commit is contained in:
parent
66c357feef
commit
3d3c196d90
2 changed files with 4 additions and 3 deletions
|
@ -1553,8 +1553,9 @@ impl PropertyDeclaration {
|
|||
} else {
|
||||
input.look_for_var_functions();
|
||||
let start = input.position();
|
||||
input.parse_entirely(|input| id.parse_into(declarations, context, input))
|
||||
.or_else(|_| {
|
||||
// Not using parse_entirely here: each ${shorthand.ident}::parse_into function
|
||||
// needs to do so *before* pushing to `declarations`.
|
||||
id.parse_into(declarations, context, input).or_else(|_| {
|
||||
while let Ok(_) = input.next() {} // Look for var() after the error.
|
||||
if input.seen_var_functions() {
|
||||
input.reset(start);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue