From 0837674947257200ee96fb1c16369f04655a4b00 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 13 Mar 2021 01:05:02 +0100 Subject: [PATCH] Fix a bunch of typos in comments --- CHANGELOG.md | 2 +- lib/src/ast/css/modifiable/node.dart | 2 +- lib/src/ast/sass/argument_declaration.dart | 2 +- lib/src/ast/selector/pseudo.dart | 4 ++-- lib/src/callable.dart | 2 +- lib/src/callable/async.dart | 2 +- lib/src/extend/extender.dart | 2 +- lib/src/extend/functions.dart | 2 +- lib/src/functions/map.dart | 2 +- lib/src/logger/tracking.dart | 2 +- lib/src/parse/stylesheet.dart | 8 ++++---- lib/src/util/character.dart | 2 +- lib/src/value/external/number.dart | 8 ++++---- lib/src/value/list.dart | 2 +- lib/src/value/number.dart | 6 +++--- lib/src/visitor/async_evaluate.dart | 8 ++++---- lib/src/visitor/evaluate.dart | 10 +++++----- test/cli/shared.dart | 2 +- test/dart_api/value/boolean_test.dart | 2 +- test/dart_api/value/null_test.dart | 2 +- test/dart_api/value/string_test.dart | 2 +- test/source_map_test.dart | 4 ++-- 22 files changed, 39 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce2159025..761a967d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -568,7 +568,7 @@ * Recognize `::slotted()` as a superselector of other `::slotted()` selectors. - * Regonize `:current()` with a vendor prefix as a superselector. + * Recognize `:current()` with a vendor prefix as a superselector. ## 1.22.10 diff --git a/lib/src/ast/css/modifiable/node.dart b/lib/src/ast/css/modifiable/node.dart index af737943b..ce1abbc1d 100644 --- a/lib/src/ast/css/modifiable/node.dart +++ b/lib/src/ast/css/modifiable/node.dart @@ -13,7 +13,7 @@ import '../style_rule.dart'; /// /// Almost all CSS nodes are the modifiable classes under the covers. However, /// modification should only be done within the evaluation step, so the -/// unmodifiable types are used elsewhere to enfore that constraint. +/// unmodifiable types are used elsewhere to enforce that constraint. abstract class ModifiableCssNode extends CssNode { /// The node that contains this, or `null` for the root [CssStylesheet] node. ModifiableCssParentNode get parent => _parent; diff --git a/lib/src/ast/sass/argument_declaration.dart b/lib/src/ast/sass/argument_declaration.dart index 9f08ae07f..9c1bf96b6 100644 --- a/lib/src/ast/sass/argument_declaration.dart +++ b/lib/src/ast/sass/argument_declaration.dart @@ -28,7 +28,7 @@ class ArgumentDeclaration implements SassNode { FileSpan get spanWithName { var text = span.file.getText(0); - // Move backwards through and whitspace between the name and the arguments. + // Move backwards through any whitespace between the name and the arguments. var i = span.start.offset - 1; while (i > 0 && isWhitespace(text.codeUnitAt(i))) { i--; diff --git a/lib/src/ast/selector/pseudo.dart b/lib/src/ast/selector/pseudo.dart index 6b516e11a..fd2bd9cde 100644 --- a/lib/src/ast/selector/pseudo.dart +++ b/lib/src/ast/selector/pseudo.dart @@ -79,7 +79,7 @@ class PseudoSelector extends SimpleSelector { // We don't consider `:not(%foo)` to be invisible because, semantically, it // means "doesn't match this selector that matches nothing", so it's // equivalent to *. If the entire compound selector is composed of `:not`s - // with invisible lists, the serialier emits it as `*`. + // with invisible lists, the serializer emits it as `*`. return name != 'not' && selector.isInvisible; } @@ -137,7 +137,7 @@ class PseudoSelector extends SimpleSelector { // [compound] has a different one than [this], unification fails. if (isElement) return null; - // Otherwise, this is a pseudo selector and should come before pseduo + // Otherwise, this is a pseudo selector and should come before pseudo // elements. result.add(this); addedThis = true; diff --git a/lib/src/callable.dart b/lib/src/callable.dart index 89beb9601..51e774413 100644 --- a/lib/src/callable.dart +++ b/lib/src/callable.dart @@ -40,7 +40,7 @@ export 'callable/user_defined.dart'; /// instead. /// /// * When manipulating values like lists, strings, and numbers that have -/// metadata (comma versus sepace separated, bracketed versus unbracketed, +/// metadata (comma versus space separated, bracketed versus unbracketed, /// quoted versus unquoted, units), the output metadata should match the input /// metadata. For lists, the [Value.changeList] method can be used to do this /// automatically. diff --git a/lib/src/callable/async.dart b/lib/src/callable/async.dart index 18ab8b69d..1d9d33243 100644 --- a/lib/src/callable/async.dart +++ b/lib/src/callable/async.dart @@ -14,7 +14,7 @@ import 'async_built_in.dart'; /// passing in arguments. /// /// This class represents callables that *need* to do asynchronous work. It's -/// only compatible with the asynchonous `compile()` methods. If a callback can +/// only compatible with the asynchronous `compile()` methods. If a callback can /// work synchronously, it should be a [Callable] instead. /// /// See [Callable] for more details. diff --git a/lib/src/extend/extender.dart b/lib/src/extend/extender.dart index 32ca2ef23..a344d0e25 100644 --- a/lib/src/extend/extender.dart +++ b/lib/src/extend/extender.dart @@ -377,7 +377,7 @@ class Extender { error.span); } - // If no extends actually happenedit (for example becaues unification + // If no extends actually happened (for example because unification // failed), we don't need to re-register the selector. if (identical(oldValue, selector.value)) continue; _registerSelector(selector.value, selector); diff --git a/lib/src/extend/functions.dart b/lib/src/extend/functions.dart index deb97e615..ef73e68b8 100644 --- a/lib/src/extend/functions.dart +++ b/lib/src/extend/functions.dart @@ -466,7 +466,7 @@ bool _mustUnify(List complex1, bool _isUnique(SimpleSelector simple) => simple is IDSelector || (simple is PseudoSelector && simple.isElement); -/// Returns all orderings of initial subseqeuences of [queue1] and [queue2]. +/// Returns all orderings of initial subsequences of [queue1] and [queue2]. /// /// The [done] callback is used to determine the extent of the initial /// subsequences. It's called with each queue until it returns `true`. diff --git a/lib/src/functions/map.dart b/lib/src/functions/map.dart index 76a1f2289..4fad491b5 100644 --- a/lib/src/functions/map.dart +++ b/lib/src/functions/map.dart @@ -208,7 +208,7 @@ SassMap _deepMergeImpl(SassMap map1, SassMap map2) { } // Because values in `map2` take precedence over `map1`, we just check if any - // entires in `map1` don't have corresponding keys in `map2`, or if they're + // entries in `map1` don't have corresponding keys in `map2`, or if they're // maps that need to be merged in their own right. map1.contents.forEach((key, value) { var resultValue = result[key]; diff --git a/lib/src/logger/tracking.dart b/lib/src/logger/tracking.dart index 4591be3b0..d149ad7f5 100644 --- a/lib/src/logger/tracking.dart +++ b/lib/src/logger/tracking.dart @@ -15,7 +15,7 @@ class TrackingLogger implements Logger { bool get emittedWarning => _emittedWarning; bool _emittedWarning = false; - /// WHether [debug] has been called on this logger. + /// Whether [debug] has been called on this logger. bool get emittedDebug => _emittedDebug; bool _emittedDebug = false; diff --git a/lib/src/parse/stylesheet.dart b/lib/src/parse/stylesheet.dart index a0b1a8398..d8711ae4a 100644 --- a/lib/src/parse/stylesheet.dart +++ b/lib/src/parse/stylesheet.dart @@ -88,7 +88,7 @@ abstract class StylesheetParser extends Parser { var statements = this.statements(() => _statement(root: true)); scanner.expectDone(); - /// Ensure that all gloal variable assignments produce a variable in this + /// Ensure that all global variable assignments produce a variable in this /// stylesheet, even if they aren't evaluated. See sass/language#50. statements.addAll(_globalVariables.values.map((declaration) => VariableDeclaration(declaration.name, @@ -1259,11 +1259,11 @@ abstract class StylesheetParser extends Parser { /// Consumes a `@moz-document` rule. /// - /// Gecko's `@-moz-document` diverges from [the specificiation][] allows the + /// Gecko's `@-moz-document` diverges from [the specification][] allows the /// `url-prefix` and `domain` functions to omit quotation marks, contrary to /// the standard. /// - /// [the specificiation]: http://www.w3.org/TR/css3-conditional/ + /// [the specification]: http://www.w3.org/TR/css3-conditional/ @protected AtRule mozDocumentRule(LineScannerState start, Interpolation name) { var valueStart = scanner.state; @@ -2345,7 +2345,7 @@ relase. For details, see http://bit.ly/moz-document. return UnaryOperationExpression(operator, operand, scanner.spanFrom(start)); } - /// Returns the unsary operator corresponding to [character], or `null` if + /// Returns the unary operator corresponding to [character], or `null` if /// the character is not a unary operator. UnaryOperator _unaryOperatorFor(int character) { switch (character) { diff --git a/lib/src/util/character.dart b/lib/src/util/character.dart index 13d2e937d..eca3be386 100644 --- a/lib/src/util/character.dart +++ b/lib/src/util/character.dart @@ -42,7 +42,7 @@ bool isNameStart(int character) => bool isName(int character) => isNameStart(character) || isDigit(character) || character == $minus; -/// Returns whether [character] is a hexadeicmal digit. +/// Returns whether [character] is a hexadecimal digit. bool isHex(int character) { if (character == null) return false; if (isDigit(character)) return true; diff --git a/lib/src/value/external/number.dart b/lib/src/value/external/number.dart index 628b9aea0..866538775 100644 --- a/lib/src/value/external/number.dart +++ b/lib/src/value/external/number.dart @@ -105,7 +105,7 @@ abstract class SassNumber extends Value { /// /// Unlike [convertToMatch], this does *not* throw an error if this number is /// unitless and [other] is not, or vice versa. Instead, it treats all - /// unitless numbers as convertable to and from all units without changing the + /// unitless numbers as convertible to and from all units without changing the /// value. /// /// Note that [coerceValueToMatch] is generally more efficient if the value is @@ -123,7 +123,7 @@ abstract class SassNumber extends Value { /// /// Unlike [convertValueToMatch], this does *not* throw an error if this /// number is unitless and [other] is not, or vice versa. Instead, it treats - /// all unitless numbers as convertable to and from all units without changing + /// all unitless numbers as convertible to and from all units without changing /// the value. /// /// Throws a [SassScriptException] if this number's units aren't compatible @@ -164,7 +164,7 @@ abstract class SassNumber extends Value { /// /// This does *not* throw an error if this number is unitless and /// [newNumerators]/[newDenominators] are not empty, or vice versa. Instead, - /// it treats all unitless numbers as convertable to and from all units + /// it treats all unitless numbers as convertible to and from all units /// without changing the value. /// /// Note that [coerceValue] is generally more efficient if the value is going @@ -183,7 +183,7 @@ abstract class SassNumber extends Value { /// /// This does *not* throw an error if this number is unitless and /// [newNumerators]/[newDenominators] are not empty, or vice versa. Instead, - /// it treats all unitless numbers as convertable to and from all units + /// it treats all unitless numbers as convertible to and from all units /// without changing the value. /// /// Throws a [SassScriptException] if this number's units aren't compatible diff --git a/lib/src/value/list.dart b/lib/src/value/list.dart index 1960e0c5e..3a6e9c803 100644 --- a/lib/src/value/list.dart +++ b/lib/src/value/list.dart @@ -69,7 +69,7 @@ class ListSeparator { /// A separator that hasn't yet been determined. /// - /// Singleton lists and empty lists don't have separators defiend. This means + /// Singleton lists and empty lists don't have separators defined. This means /// that list functions will prefer other lists' separators if possible. static const undecided = ListSeparator._("undecided", null); diff --git a/lib/src/value/number.dart b/lib/src/value/number.dart index dfb9acf9b..8bec13d2a 100644 --- a/lib/src/value/number.dart +++ b/lib/src/value/number.dart @@ -285,7 +285,7 @@ abstract class SassNumber extends Value implements ext.SassNumber { /// Converts [value] to [newNumerators] and [newDenominators]. /// - /// If [coerceUnitless] is `true`, this considers unitless numbers convertable + /// If [coerceUnitless] is `true`, this considers unitless numbers convertible /// to and from any unit. Otherwise, it will throw a [SassScriptException] for /// such a conversion. /// @@ -557,14 +557,14 @@ abstract class SassNumber extends Value implements ext.SassNumber { /// unit in [units2]. bool _areAnyConvertible(List units1, List units2) { return units1.any((unit1) { - if (!_isConvertable(unit1)) return units2.contains(unit1); + if (!_isConvertible(unit1)) return units2.contains(unit1); var innerMap = _conversions[unit1]; return units2.any(innerMap.containsKey); }); } /// Returns whether [unit] can be converted to or from any other units. - bool _isConvertable(String unit) => _conversions.containsKey(unit); + bool _isConvertible(String unit) => _conversions.containsKey(unit); /// Returns the number of [unit1]s per [unit2]. /// diff --git a/lib/src/visitor/async_evaluate.dart b/lib/src/visitor/async_evaluate.dart index b62955c0f..683ac596e 100644 --- a/lib/src/visitor/async_evaluate.dart +++ b/lib/src/visitor/async_evaluate.dart @@ -129,7 +129,7 @@ class _EvaluateVisitor /// compiled to Node.js. final NodeImporter _nodeImporter; - /// Built-in functions that are globally-acessible, even under the new module + /// Built-in functions that are globally-accessible, even under the new module /// system. final _builtInFunctions = {}; @@ -264,7 +264,7 @@ class _EvaluateVisitor /// The configuration for the current module. /// - /// If this is empty, that indicates that the current module is not confiured. + /// If this is empty, that indicates that the current module is not configured. var _configuration = const Configuration.empty(); /// Creates a new visitor. @@ -1820,7 +1820,7 @@ class _EvaluateVisitor } } - /// Evlauates [condition] and converts it to a plain CSS string, with + /// Evaluates [condition] and converts it to a plain CSS string, with /// parentheses if necessary. /// /// If [operator] is passed, it's the operator for the surrounding @@ -2513,7 +2513,7 @@ class _EvaluateVisitor // stylesheets that themselves contain `@use` rules, and CSS included via the // `load-css()` function. When we load a module using one of these constructs, // we first convert it to CSS (we can't evaluate it as Sass directly because - // it may be used elsewhere and it must only be evaluatedonce). Then we + // it may be used elsewhere and it must only be evaluated once). Then we // execute that CSS more or less as though it were Sass (we can't inject it // into the stylesheet as-is because the `@import` may be nested in other // rules). That's what these rules implement. diff --git a/lib/src/visitor/evaluate.dart b/lib/src/visitor/evaluate.dart index aa2df383e..cbf9e553d 100644 --- a/lib/src/visitor/evaluate.dart +++ b/lib/src/visitor/evaluate.dart @@ -5,7 +5,7 @@ // DO NOT EDIT. This file was generated from async_evaluate.dart. // See tool/grind/synchronize.dart for details. // -// Checksum: 0e9e7b6b99be25500cfd6469b0366190e92c43f4 +// Checksum: 19b8ae9db8df63d9357ed43724edc16efb8d7fc9 // // ignore_for_file: unused_import @@ -137,7 +137,7 @@ class _EvaluateVisitor /// compiled to Node.js. final NodeImporter _nodeImporter; - /// Built-in functions that are globally-acessible, even under the new module + /// Built-in functions that are globally-accessible, even under the new module /// system. final _builtInFunctions = {}; @@ -272,7 +272,7 @@ class _EvaluateVisitor /// The configuration for the current module. /// - /// If this is empty, that indicates that the current module is not confiured. + /// If this is empty, that indicates that the current module is not configured. var _configuration = const Configuration.empty(); /// Creates a new visitor. @@ -1811,7 +1811,7 @@ class _EvaluateVisitor } } - /// Evlauates [condition] and converts it to a plain CSS string, with + /// Evaluates [condition] and converts it to a plain CSS string, with /// parentheses if necessary. /// /// If [operator] is passed, it's the operator for the surrounding @@ -2495,7 +2495,7 @@ class _EvaluateVisitor // stylesheets that themselves contain `@use` rules, and CSS included via the // `load-css()` function. When we load a module using one of these constructs, // we first convert it to CSS (we can't evaluate it as Sass directly because - // it may be used elsewhere and it must only be evaluatedonce). Then we + // it may be used elsewhere and it must only be evaluated once). Then we // execute that CSS more or less as though it were Sass (we can't inject it // into the stylesheet as-is because the `@import` may be nested in other // rules). That's what these rules implement. diff --git a/test/cli/shared.dart b/test/cli/shared.dart index 736686da3..d40f4604e 100644 --- a/test/cli/shared.dart +++ b/test/cli/shared.dart @@ -315,7 +315,7 @@ void sharedTests( // Regression test for an issue mentioned in sass/linter#15 test( - "gracefully reports errors for binary operations with parentheized " + "gracefully reports errors for binary operations with parenthesized " "operands", () async { var sass = await runSass(["--no-unicode", "-"]); sass.stdin.writeln("a {b: (#123) + (#456)}"); diff --git a/test/dart_api/value/boolean_test.dart b/test/dart_api/value/boolean_test.dart index 875431485..112e8b3ec 100644 --- a/test/dart_api/value/boolean_test.dart +++ b/test/dart_api/value/boolean_test.dart @@ -41,7 +41,7 @@ void main() { Value value; setUp(() => value = parseValue("false")); - test("is falsey", () { + test("is falsy", () { expect(value.isTruthy, isFalse); }); diff --git a/test/dart_api/value/null_test.dart b/test/dart_api/value/null_test.dart index 6e3e9295d..564a7ebdd 100644 --- a/test/dart_api/value/null_test.dart +++ b/test/dart_api/value/null_test.dart @@ -14,7 +14,7 @@ void main() { Value value; setUp(() => value = parseValue("null")); - test("is falsey", () { + test("is falsy", () { expect(value.isTruthy, isFalse); }); diff --git a/test/dart_api/value/string_test.dart b/test/dart_api/value/string_test.dart index 3e8c3642e..a2fca6c9e 100644 --- a/test/dart_api/value/string_test.dart +++ b/test/dart_api/value/string_test.dart @@ -142,7 +142,7 @@ void main() { }); }); - group("an unquoted Unicde", () { + group("an unquoted Unicode", () { SassString value; setUp(() => value = parseValue("a👭b👬c") as SassString); diff --git a/test/source_map_test.dart b/test/source_map_test.dart index e6e5d22e3..91d626acc 100644 --- a/test/source_map_test.dart +++ b/test/source_map_test.dart @@ -32,7 +32,7 @@ void main() { """); }); - test("with a mutliline selector", () { + test("with a multiline selector", () { _expectSourceMap(""" {{1}}foo, bar @@ -754,7 +754,7 @@ void _expectSassSourceMap(String sass, String css, _expectMapMatches(sassMap, sassText, cssText, sassLocations, cssLocations); } -/// Returns [string] with leading whitepsace stripped from each line so that the +/// Returns [string] with leading whitespace stripped from each line so that the /// least-indented line has zero indentation. String _reindent(String string) { var lines = trimAsciiRight(string).split("\n");