Code review

This commit is contained in:
Natalie Weizenbaum 2021-05-13 16:43:15 -07:00
parent 68c4d6556e
commit 5a0242a090
4 changed files with 9 additions and 9 deletions

View File

@ -740,7 +740,7 @@ Object /* SassString | List<Value> */ _parseChannels(
var list = channels.asList;
if (list.length > 3) {
throw SassScriptException("Only 3 elements allowed, but ${list.length} "
"${pluralize('was', list.length, plural: 'were')} passed.");
"were passed.");
} else if (list.length < 3) {
if (list.any((value) => value.isVar) ||
(list.isNotEmpty && _isVarSlash(list.last))) {

View File

@ -2925,9 +2925,9 @@ class _EvaluateVisitor
/// Returns the [AstNode] whose span should be used for [expression].
///
/// If [expression] is a variable reference and [_sourceMap] is `true`,
/// [AstNode]'s span will be the span where that variable was originally
/// declared. Otherwise, this will just return [expression].
/// If [expression] is a variable reference, [AstNode]'s span will be the span
/// where that variable was originally declared. Otherwise, this will just
/// return [expression].
///
/// This returns an [AstNode] rather than a [FileSpan] so we can avoid calling
/// [AstNode.span] if the span isn't required, since some nodes need to do

View File

@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_evaluate.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 1546b59aa219428e5e9458b8f0360192b544d073
// Checksum: 21d03e5b2631b77c590036153fa3d9078e031136
//
// ignore_for_file: unused_import
@ -2900,9 +2900,9 @@ class _EvaluateVisitor
/// Returns the [AstNode] whose span should be used for [expression].
///
/// If [expression] is a variable reference and [_sourceMap] is `true`,
/// [AstNode]'s span will be the span where that variable was originally
/// declared. Otherwise, this will just return [expression].
/// If [expression] is a variable reference, [AstNode]'s span will be the span
/// where that variable was originally declared. Otherwise, this will just
/// return [expression].
///
/// This returns an [AstNode] rather than a [FileSpan] so we can avoid calling
/// [AstNode.span] if the span isn't required, since some nodes need to do

View File

@ -116,7 +116,7 @@ void main() {
});
});
test("a slash-separated list is space-separated", () {
test("a slash-separated list is slash-separated", () {
expect(parseValue("list.slash(a, b, c)").separator,
equals(ListSeparator.slash));
});