Remove leading underscore on local identifiers

This commit is contained in:
Christophe Coevoet 2022-09-03 00:15:22 +02:00
parent 35cd8a77d9
commit fec9a2aced
2 changed files with 7 additions and 7 deletions

View File

@ -170,7 +170,7 @@ final _hasKey = _function("has-key", r"$map, $key, $keys...", (arguments) {
Value _modify(SassMap map, Iterable<Value> keys, Value modify(Value old),
{bool addNesting = true}) {
var keyIterator = keys.iterator;
SassMap _modifyNestedMap(SassMap map) {
SassMap modifyNestedMap(SassMap map) {
var mutableMap = Map.of(map.contents);
var key = keyIterator.current;
@ -182,11 +182,11 @@ Value _modify(SassMap map, Iterable<Value> keys, Value modify(Value old),
var nestedMap = mutableMap[key]?.tryMap();
if (nestedMap == null && !addNesting) return SassMap(mutableMap);
mutableMap[key] = _modifyNestedMap(nestedMap ?? const SassMap.empty());
mutableMap[key] = modifyNestedMap(nestedMap ?? const SassMap.empty());
return SassMap(mutableMap);
}
return keyIterator.moveNext() ? _modifyNestedMap(map) : modify(map);
return keyIterator.moveNext() ? modifyNestedMap(map) : modify(map);
}
/// Merges [map1] and [map2], with values in [map2] taking precedence.

View File

@ -593,7 +593,7 @@ abstract class SassNumber extends Value {
var otherHasUnits = newNumerators.isNotEmpty || newDenominators.isNotEmpty;
if (coerceUnitless && (!hasUnits || !otherHasUnits)) return this.value;
SassScriptException _compatibilityException() {
SassScriptException compatibilityException() {
if (other != null) {
var message = StringBuffer("$this and");
if (otherName != null) message.write(" \$$otherName:");
@ -634,7 +634,7 @@ abstract class SassNumber extends Value {
if (factor == null) return false;
value *= factor;
return true;
}, orElse: () => throw _compatibilityException());
}, orElse: () => throw compatibilityException());
}
var oldDenominators = denominatorUnits.toList();
@ -644,11 +644,11 @@ abstract class SassNumber extends Value {
if (factor == null) return false;
value /= factor;
return true;
}, orElse: () => throw _compatibilityException());
}, orElse: () => throw compatibilityException());
}
if (oldNumerators.isNotEmpty || oldDenominators.isNotEmpty) {
throw _compatibilityException();
throw compatibilityException();
}
return value;