mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Update to cssparser 0.19, count line numbers during tokenization
This commit is contained in:
parent
32f835260c
commit
7382dad939
33 changed files with 145 additions and 196 deletions
|
@ -1502,12 +1502,12 @@ impl PropertyDeclaration {
|
|||
PropertyDeclaration::CSSWideKeyword(id, keyword)
|
||||
}).or_else(|()| {
|
||||
input.look_for_var_functions();
|
||||
let start = input.position();
|
||||
let start = input.state();
|
||||
input.parse_entirely(|input| id.parse_value(context, input))
|
||||
.or_else(|err| {
|
||||
while let Ok(_) = input.next() {} // Look for var() after the error.
|
||||
if input.seen_var_functions() {
|
||||
input.reset(start);
|
||||
input.reset(&start);
|
||||
let (first_token_type, css) =
|
||||
::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
|
||||
PropertyDeclarationParseError::InvalidValue(id.name().into(),
|
||||
|
@ -1540,13 +1540,13 @@ impl PropertyDeclaration {
|
|||
Ok(())
|
||||
} else {
|
||||
input.look_for_var_functions();
|
||||
let start = input.position();
|
||||
let start = input.state();
|
||||
// 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(|err| {
|
||||
while let Ok(_) = input.next() {} // Look for var() after the error.
|
||||
if input.seen_var_functions() {
|
||||
input.reset(start);
|
||||
input.reset(&start);
|
||||
let (first_token_type, css) =
|
||||
::custom_properties::parse_non_custom_with_var(input).map_err(|e| {
|
||||
PropertyDeclarationParseError::InvalidValue(id.name().into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue