diff --git a/lib/src/ast/sass/expression/list.dart b/lib/src/ast/sass/expression/list.dart index ee975ff2..3bf4544e 100644 --- a/lib/src/ast/sass/expression/list.dart +++ b/lib/src/ast/sass/expression/list.dart @@ -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. diff --git a/lib/src/value.dart b/lib/src/value.dart index 2d9c4a32..05276ceb 100644 --- a/lib/src/value.dart +++ b/lib/src/value.dart @@ -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'; diff --git a/lib/src/value/list.dart b/lib/src/value/list.dart index 1f67aee3..4076aa45 100644 --- a/lib/src/value/list.dart +++ b/lib/src/value/list.dart @@ -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; }