Fix not().

This commit is contained in:
Natalie Weizenbaum 2017-01-15 13:57:50 -08:00
parent 6192dfd1b0
commit 84d6c07707
2 changed files with 6 additions and 4 deletions

View File

@ -45,6 +45,8 @@
* Fix an edge-case where division was being incorrectly emitted as a slash.
* Fix `not` when used like a function.
## 1.0.0-alpha.8
* Add the `content-exists()` function.

View File

@ -1923,6 +1923,10 @@ abstract class StylesheetParser extends Parser {
var invocation = _argumentInvocation();
return new IfExpression(
invocation, spanForList([identifier, invocation]));
} else if (plain == "not") {
whitespace();
return new UnaryOperationExpression(
UnaryOperator.not, _singleExpression(), identifier.span);
}
var lower = plain.toLowerCase();
@ -1930,10 +1934,6 @@ abstract class StylesheetParser extends Parser {
switch (plain) {
case "false":
return new BooleanExpression(false, identifier.span);
case "not":
whitespace();
return new UnaryOperationExpression(
UnaryOperator.not, _singleExpression(), identifier.span);
case "null":
return new NullExpression(identifier.span);
case "true":