Skip to content

Commit

Permalink
Remove leading underscore on local identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Sep 2, 2022
1 parent 35cd8a7 commit fec9a2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/src/functions/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions lib/src/value/number.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:");
Expand Down Expand Up @@ -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();
Expand All @@ -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;
Expand Down

0 comments on commit fec9a2a

Please sign in to comment.