unaryExpression method
Implementation
@override
Parser unaryExpression() => super.unaryExpression().map((c) {
if (c is List && c.length == 2) {
if (c[0].value == '-') {
if (c[1] is Expression<Number>) {
return NegateNumberExpression(c[1]);
}
if (c[1] is Expression<Duration>) {
return NegateDurationExpression(c[1]);
}
} else if (c[0].value == '!') {
if (c[1] is Expression<bool>) {
return NegateBoolExpression(c[1]);
}
}
}
return c;
});