Fix analysis.

This commit is contained in:
Natalie Weizenbaum 2016-08-14 23:47:06 -07:00
parent 3108dc46e9
commit a206fdcddb
3 changed files with 8 additions and 7 deletions

View File

@ -48,14 +48,14 @@ class ListExpression implements Expression {
if (expression.isBracketed) return false;
return separator == ListSeparator.comma
? separator == ListSeparator.comma
: separator != ListSeparator.unknown;
: separator != ListSeparator.undecided;
}
if (separator != ListSeparator.space) return false;
if (element is UnaryOperatorExpression) {
return element.operator == UnaryOperator.plus ||
element.operator == UnaryOperator.minus;
if (expression is UnaryOperatorExpression) {
return expression.operator == UnaryOperator.plus ||
expression.operator == UnaryOperator.minus;
}
// TODO: handle binary operations.

View File

@ -4,6 +4,7 @@
import 'value/boolean.dart';
import 'value/identifier.dart';
import 'visitor/css/serialize.dart';
import 'visitor/value.dart';
export 'value/boolean.dart';

View File

@ -45,11 +45,11 @@ class SassList extends Value {
bool _elementNeedsParens(Value value) {
if (value is SassList) {
if (expression.contents.length < 2) return false;
if (expression.isBracketed) return false;
if (value.contents.length < 2) return false;
if (value.isBracketed) return false;
return separator == ListSeparator.comma
? separator == ListSeparator.comma
: separator != ListSeparator.unknown;
: separator != ListSeparator.undecided;
}
return false;
}