simplify media query ==
comparison check
This commit is contained in:
parent
605f4f3d6b
commit
c0c8de6eb9
@ -34,13 +34,13 @@ impl<'a> Parser<'a> {
|
|||||||
| Some(Token { kind: ':', .. })
|
| Some(Token { kind: ':', .. })
|
||||||
| Some(Token { kind: ')', .. }) => true,
|
| Some(Token { kind: ')', .. }) => true,
|
||||||
Some(Token { kind: '=', .. }) => {
|
Some(Token { kind: '=', .. }) => {
|
||||||
if matches!(toks.peek_next(), Some(Token { kind: '=', .. })) {
|
let is_double_eq = matches!(toks.peek_next(), Some(Token { kind: '=', .. }));
|
||||||
toks.reset_cursor();
|
toks.reset_cursor();
|
||||||
false
|
// if it is a double eq, then parse as normal
|
||||||
} else {
|
//
|
||||||
toks.reset_cursor();
|
// otherwise, it is a single eq and we should
|
||||||
true
|
// treat it as a comparison
|
||||||
}
|
!is_double_eq
|
||||||
}
|
}
|
||||||
_ => false,
|
_ => false,
|
||||||
})?;
|
})?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user