Skip to content

Commit

Permalink
Fix multi value nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
hydroper committed Apr 28, 2024
1 parent 4ab1bc9 commit af0e21e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/parser/operator/operator_precedence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ impl TryFrom<u32> for OperatorPrecedence {
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[repr(u32)]
pub enum CssOperatorPrecedence {
Unary = 3,
MultiValue = 2,
Array = 1,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/parser/parser/css_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ impl<'input> CssParser<'input> {
if let Some(mv1) = self.parse_opt_property_value(CssOperatorPrecedence::MultiValue) {
self.push_location(&base.location());
let mut values: Vec<Rc<CssPropertyValue>> = vec![base, mv1];
while let Some(mv1) = self.parse_opt_property_value(CssOperatorPrecedence::MultiValue) {
while let Some(mv1) = self.parse_opt_property_value(CssOperatorPrecedence::MultiValue.add(1).unwrap()) {
values.push(mv1);
}
base = Rc::new(CssPropertyValue::MultiValue(CssMultiValuePropertyValue {
Expand Down
Binary file modified demo/dist/as3_parser_demo_bg.wasm
Binary file not shown.

0 comments on commit af0e21e

Please sign in to comment.