mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 05:41:14 +01:00
Fix analysis.
This commit is contained in:
parent
3108dc46e9
commit
a206fdcddb
@ -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.
|
||||
|
@ -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';
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user