From fec9a2aced41282386254addf36db921f646487c Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 3 Sep 2022 00:15:22 +0200 Subject: [PATCH] Remove leading underscore on local identifiers --- lib/src/functions/map.dart | 6 +++--- lib/src/value/number.dart | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/functions/map.dart b/lib/src/functions/map.dart index e317e228..f07e1c3b 100644 --- a/lib/src/functions/map.dart +++ b/lib/src/functions/map.dart @@ -170,7 +170,7 @@ final _hasKey = _function("has-key", r"$map, $key, $keys...", (arguments) { Value _modify(SassMap map, Iterable 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 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. diff --git a/lib/src/value/number.dart b/lib/src/value/number.dart index 8caa4204..47d31157 100644 --- a/lib/src/value/number.dart +++ b/lib/src/value/number.dart @@ -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;