better support for unary plus

This commit is contained in:
ConnorSkees 2020-04-20 02:19:54 -04:00
parent b6cf00c87b
commit f8540755f5
2 changed files with 9 additions and 0 deletions

View File

@ -305,6 +305,10 @@ fn single_value<I: Iterator<Item = IntermediateValue>>(
span: op.span.merge(val.span),
}
}
Op::Plus => {
devour_whitespace(iter);
single_value(iter, scope, super_selector, span)?
}
_ => todo!(),
},
IntermediateValue::Whitespace => unreachable!(),

View File

@ -199,3 +199,8 @@ test!(
"a {\n color: 10-#{10};\n}\n",
"a {\n color: 10 -10;\n}\n"
);
test!(
plus_after_minus,
"a {\n plus-after-minus: 1 - + 2;\n}\n",
"a {\n plus-after-minus: -1;\n}\n"
);