mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -194,7 +194,7 @@ impl CalcNode {
|
|||
let mut root = Self::parse_product(context, input, expected_unit)?;
|
||||
|
||||
loop {
|
||||
let position = input.position();
|
||||
let start = input.state();
|
||||
match input.next_including_whitespace() {
|
||||
Ok(&Token::WhiteSpace(_)) => {
|
||||
if input.is_exhausted() {
|
||||
|
@ -220,7 +220,7 @@ impl CalcNode {
|
|||
}
|
||||
}
|
||||
_ => {
|
||||
input.reset(position);
|
||||
input.reset(&start);
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ impl CalcNode {
|
|||
let mut root = Self::parse_one(context, input, expected_unit)?;
|
||||
|
||||
loop {
|
||||
let position = input.position();
|
||||
let start = input.state();
|
||||
match input.next() {
|
||||
Ok(&Token::Delim('*')) => {
|
||||
let rhs = Self::parse_one(context, input, expected_unit)?;
|
||||
|
@ -261,7 +261,7 @@ impl CalcNode {
|
|||
root = new_root;
|
||||
}
|
||||
_ => {
|
||||
input.reset(position);
|
||||
input.reset(&start);
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue