Skip to content

Commit

Permalink
Fix a bunch of typos in comments (#1257)
Browse files Browse the repository at this point in the history
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
  • Loading branch information
stof and nex3 committed Apr 15, 2021
1 parent 7106bac commit fbd9cfd
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/css/modifiable/node.dart
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/sass/argument_declaration.dart
Expand Up @@ -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--;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ast/selector/pseudo.dart
Expand Up @@ -80,7 +80,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;
}

Expand Down Expand Up @@ -138,7 +138,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;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/callable.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/callable/async.dart
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/extend/extension_store.dart
Expand Up @@ -389,7 +389,7 @@ class ExtensionStore {
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);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/extend/functions.dart
Expand Up @@ -467,7 +467,7 @@ bool _mustUnify(List<ComplexSelectorComponent> 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`.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/functions/map.dart
Expand Up @@ -206,7 +206,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];
Expand Down
2 changes: 1 addition & 1 deletion lib/src/logger/tracking.dart
Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions lib/src/parse/stylesheet.dart
Expand Up @@ -99,7 +99,7 @@ abstract class StylesheetParser extends Parser {
});
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,
Expand Down Expand Up @@ -1263,11 +1263,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;
Expand Down Expand Up @@ -2392,7 +2392,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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/util/character.dart
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lib/src/value/external/number.dart
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -165,7 +165,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
Expand All @@ -184,7 +184,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
Expand Down
2 changes: 1 addition & 1 deletion lib/src/value/list.dart
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion lib/src/value/number.dart
Expand Up @@ -290,7 +290,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.
///
Expand Down
8 changes: 4 additions & 4 deletions lib/src/visitor/async_evaluate.dart
Expand Up @@ -128,7 +128,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 = <String, AsyncCallable>{};

Expand Down Expand Up @@ -278,7 +278,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.
Expand Down Expand Up @@ -1897,7 +1897,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
Expand Down Expand Up @@ -2592,7 +2592,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.
Expand Down
10 changes: 5 additions & 5 deletions lib/src/visitor/evaluate.dart
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_evaluate.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 6b82405fdc448ac69ca703bc6bffbb8d50f3fced
// Checksum: acaafcfe17e8cb582fb01ea8b95afaf871af4eed
//
// ignore_for_file: unused_import

Expand Down Expand Up @@ -136,7 +136,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 = <String, Callable>{};

Expand Down Expand Up @@ -286,7 +286,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.
Expand Down Expand Up @@ -1890,7 +1890,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
Expand Down Expand Up @@ -2576,7 +2576,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.
Expand Down
2 changes: 1 addition & 1 deletion test/cli/shared.dart
Expand Up @@ -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)}");
Expand Down
2 changes: 1 addition & 1 deletion test/dart_api/value/boolean_test.dart
Expand Up @@ -41,7 +41,7 @@ void main() {
late Value value;
setUp(() => value = parseValue("false"));

test("is falsey", () {
test("is falsy", () {
expect(value.isTruthy, isFalse);
});

Expand Down
2 changes: 1 addition & 1 deletion test/dart_api/value/null_test.dart
Expand Up @@ -14,7 +14,7 @@ void main() {
late Value value;
setUp(() => value = parseValue("null"));

test("is falsey", () {
test("is falsy", () {
expect(value.isTruthy, isFalse);
});

Expand Down
2 changes: 1 addition & 1 deletion test/dart_api/value/string_test.dart
Expand Up @@ -142,7 +142,7 @@ void main() {
});
});

group("an unquoted Unicde", () {
group("an unquoted Unicode", () {
late SassString value;
setUp(() => value = parseValue("a👭b👬c") as SassString);

Expand Down
4 changes: 2 additions & 2 deletions test/source_map_test.dart
Expand Up @@ -32,7 +32,7 @@ void main() {
""");
});

test("with a mutliline selector", () {
test("with a multiline selector", () {
_expectSourceMap("""
{{1}}foo,
bar
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit fbd9cfd

Please sign in to comment.