mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Fix whitespace handling in clamp() parsing
We should just restore the state when seeing whitespace and an unknown token like when we do when finding any other token a few lines below. This is not an issue for most callers (it's only an issue for clamp()) because the other callers use either `parse_comma_separated()` (for min/max), or `parse_nested_block()` (for parens / nested calc()). Both of those functions restrict the input in such a way that is_exhausted returns true (a few lines above) and thus we parse successfully. Differential Revision: https://phabricator.services.mozilla.com/D112681
This commit is contained in:
parent
d12cb17d73
commit
54965bbcb9
1 changed files with 3 additions and 3 deletions
|
@ -374,9 +374,9 @@ impl CalcNode {
|
|||
rhs.negate();
|
||||
sum.push(rhs);
|
||||
},
|
||||
ref t => {
|
||||
let t = t.clone();
|
||||
return Err(input.new_unexpected_token_error(t));
|
||||
_ => {
|
||||
input.reset(&start);
|
||||
break;
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue