From 1edc247425c0d6731e750f13e2d5386c076f9b33 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 9 Jul 2024 14:13:55 -0700 Subject: [PATCH] Avoid `[this]` in Dartdoc comments (#2273) Dartdoc broke this in dart-lang/dartdoc#3765. --- lib/src/ast/css/modifiable/node.dart | 8 ++-- lib/src/ast/sass/at_root_query.dart | 4 +- .../ast/sass/expression/binary_operation.dart | 6 +-- lib/src/ast/sass/expression/list.dart | 2 +- lib/src/ast/sass/expression/string.dart | 2 +- .../ast/sass/expression/unary_operation.dart | 4 +- lib/src/ast/selector.dart | 2 +- lib/src/ast/selector/list.dart | 4 +- lib/src/ast/selector/pseudo.dart | 2 +- lib/src/ast/selector/simple.dart | 2 +- lib/src/async_environment.dart | 4 +- lib/src/environment.dart | 6 +-- lib/src/extend/extension_store.dart | 10 ++--- lib/src/stylesheet_graph.dart | 2 +- lib/src/util/map.dart | 2 +- lib/src/util/multi_span.dart | 2 +- lib/src/util/nullable.dart | 2 +- lib/src/util/span.dart | 4 +- lib/src/value.dart | 42 +++++++++---------- lib/src/value/calculation.dart | 6 +-- lib/src/value/number.dart | 32 +++++++------- 21 files changed, 74 insertions(+), 74 deletions(-) diff --git a/lib/src/ast/css/modifiable/node.dart b/lib/src/ast/css/modifiable/node.dart index bef0be821..1b27f8258 100644 --- a/lib/src/ast/css/modifiable/node.dart +++ b/lib/src/ast/css/modifiable/node.dart @@ -17,7 +17,7 @@ abstract base class ModifiableCssNode extends CssNode { ModifiableCssParentNode? get parent => _parent; ModifiableCssParentNode? _parent; - /// The index of [this] in `parent.children`. + /// The index of `this` in `parent.children`. /// /// This makes [remove] more efficient. int? _indexInParent; @@ -33,7 +33,7 @@ abstract base class ModifiableCssNode extends CssNode { T accept(ModifiableCssVisitor visitor); - /// Removes [this] from [parent]'s child list. + /// Removes `this` from [parent]'s child list. /// /// Throws a [StateError] if [parent] is `null`. void remove() { @@ -65,10 +65,10 @@ abstract base class ModifiableCssParentNode extends ModifiableCssNode : _children = children, children = UnmodifiableListView(children); - /// Returns whether [this] is equal to [other], ignoring their child nodes. + /// Returns whether `this` is equal to [other], ignoring their child nodes. bool equalsIgnoringChildren(ModifiableCssNode other); - /// Returns a copy of [this] with an empty [children] list. + /// Returns a copy of `this` with an empty [children] list. /// /// This is *not* a deep copy. If other parts of this node are modifiable, /// they are shared between the new and old nodes. diff --git a/lib/src/ast/sass/at_root_query.dart b/lib/src/ast/sass/at_root_query.dart index 3bad9cf20..58b2e2f94 100644 --- a/lib/src/ast/sass/at_root_query.dart +++ b/lib/src/ast/sass/at_root_query.dart @@ -61,7 +61,7 @@ final class AtRootQuery { {Object? url, Logger? logger, InterpolationMap? interpolationMap}) => AtRootQueryParser(contents, url: url, logger: logger).parse(); - /// Returns whether [this] excludes [node]. + /// Returns whether `this` excludes [node]. /// /// @nodoc @internal @@ -76,6 +76,6 @@ final class AtRootQuery { }; } - /// Returns whether [this] excludes an at-rule with the given [name]. + /// Returns whether `this` excludes an at-rule with the given [name]. bool excludesName(String name) => (_all || names.contains(name)) != include; } diff --git a/lib/src/ast/sass/expression/binary_operation.dart b/lib/src/ast/sass/expression/binary_operation.dart index dc750900a..15ab22bba 100644 --- a/lib/src/ast/sass/expression/binary_operation.dart +++ b/lib/src/ast/sass/expression/binary_operation.dart @@ -153,13 +153,13 @@ enum BinaryOperator { /// The modulo operator, `%`. modulo('modulo', '%', 6); - /// The English name of [this]. + /// The English name of `this`. final String name; - /// The Sass syntax for [this]. + /// The Sass syntax for `this`. final String operator; - /// The precedence of [this]. + /// The precedence of `this`. /// /// An operator with higher precedence binds tighter. final int precedence; diff --git a/lib/src/ast/sass/expression/list.dart b/lib/src/ast/sass/expression/list.dart index 01416afa4..5bf768cac 100644 --- a/lib/src/ast/sass/expression/list.dart +++ b/lib/src/ast/sass/expression/list.dart @@ -58,7 +58,7 @@ final class ListExpression implements Expression { return buffer.toString(); } - /// Returns whether [expression], contained in [this], needs parentheses when + /// Returns whether [expression], contained in `this`, needs parentheses when /// printed as Sass source. bool _elementNeedsParens(Expression expression) => switch (expression) { ListExpression( diff --git a/lib/src/ast/sass/expression/string.dart b/lib/src/ast/sass/expression/string.dart index 2e7824345..a8539146a 100644 --- a/lib/src/ast/sass/expression/string.dart +++ b/lib/src/ast/sass/expression/string.dart @@ -23,7 +23,7 @@ final class StringExpression implements Expression { /// included. final Interpolation text; - /// Whether [this] has quotes. + /// Whether `this` has quotes. final bool hasQuotes; FileSpan get span => text.span; diff --git a/lib/src/ast/sass/expression/unary_operation.dart b/lib/src/ast/sass/expression/unary_operation.dart index d437fafc2..18e5f0c27 100644 --- a/lib/src/ast/sass/expression/unary_operation.dart +++ b/lib/src/ast/sass/expression/unary_operation.dart @@ -63,10 +63,10 @@ enum UnaryOperator { /// The boolean negation operator, `not`. not('not', 'not'); - /// The English name of [this]. + /// The English name of `this`. final String name; - /// The Sass syntax for [this]. + /// The Sass syntax for `this`. final String operator; const UnaryOperator(this.name, this.operator); diff --git a/lib/src/ast/selector.dart b/lib/src/ast/selector.dart index 953ccf7aa..fcabcdc25 100644 --- a/lib/src/ast/selector.dart +++ b/lib/src/ast/selector.dart @@ -83,7 +83,7 @@ abstract base class Selector implements AstNode { Selector(this.span); - /// Prints a warning if [this] is a bogus selector. + /// Prints a warning if `this` is a bogus selector. /// /// This may only be called from within a custom Sass function. This will /// throw a [SassException] in Dart Sass 2.0.0. diff --git a/lib/src/ast/selector/list.dart b/lib/src/ast/selector/list.dart index 8da4598f6..b45fa2a2d 100644 --- a/lib/src/ast/selector/list.dart +++ b/lib/src/ast/selector/list.dart @@ -96,9 +96,9 @@ final class SelectorList extends Selector { return contents.isEmpty ? null : SelectorList(contents, span); } - /// Returns a new selector list that represents [this] nested within [parent]. + /// Returns a new selector list that represents `this` nested within [parent]. /// - /// By default, this replaces [ParentSelector]s in [this] with [parent]. If + /// By default, this replaces [ParentSelector]s in `this` with [parent]. If /// [preserveParentSelectors] is true, this instead preserves those selectors /// as parent selectors. /// diff --git a/lib/src/ast/selector/pseudo.dart b/lib/src/ast/selector/pseudo.dart index e632c651e..930d49e08 100644 --- a/lib/src/ast/selector/pseudo.dart +++ b/lib/src/ast/selector/pseudo.dart @@ -174,7 +174,7 @@ final class PseudoSelector extends SimpleSelector { for (var simple in compound) { if (simple case PseudoSelector(isElement: true)) { // A given compound selector may only contain one pseudo element. If - // [compound] has a different one than [this], unification fails. + // [compound] has a different one than `this`, unification fails. if (isElement) return null; // Otherwise, this is a pseudo selector and should come before pseudo diff --git a/lib/src/ast/selector/simple.dart b/lib/src/ast/selector/simple.dart index 5ac2f0e53..acc86949e 100644 --- a/lib/src/ast/selector/simple.dart +++ b/lib/src/ast/selector/simple.dart @@ -59,7 +59,7 @@ abstract base class SimpleSelector extends Selector { url: url, logger: logger, allowParent: allowParent) .parseSimpleSelector(); - /// Returns a new [SimpleSelector] based on [this], as though it had been + /// Returns a new [SimpleSelector] based on `this`, as though it had been /// written with [suffix] at the end. /// /// Assumes [suffix] is a valid identifier suffix. If this wouldn't produce a diff --git a/lib/src/async_environment.dart b/lib/src/async_environment.dart index 96cbecc18..5313d8c45 100644 --- a/lib/src/async_environment.dart +++ b/lib/src/async_environment.dart @@ -790,7 +790,7 @@ final class AsyncEnvironment { return Configuration.implicit(configuration); } - /// Returns a module that represents the top-level members defined in [this], + /// Returns a module that represents the top-level members defined in `this`, /// that contains [css] and [preModuleComments] as its CSS, which can be /// extended using [extensionStore]. Module toModule( @@ -802,7 +802,7 @@ final class AsyncEnvironment { forwarded: _forwardedModules.andThen((modules) => MapKeySet(modules))); } - /// Returns a module with the same members and upstream modules as [this], but + /// Returns a module with the same members and upstream modules as `this`, but /// an empty stylesheet and extension store. /// /// This is used when resolving imports, since they need to inject forwarded diff --git a/lib/src/environment.dart b/lib/src/environment.dart index 623f67828..3aa0fa45d 100644 --- a/lib/src/environment.dart +++ b/lib/src/environment.dart @@ -5,7 +5,7 @@ // DO NOT EDIT. This file was generated from async_environment.dart. // See tool/grind/synchronize.dart for details. // -// Checksum: f7172be68e0a19c4dc2d2ad04fc32a843a98a6bd +// Checksum: e1beeae58a4d5b97cd7d4f01c7d46b0586b508b9 // // ignore_for_file: unused_import @@ -796,7 +796,7 @@ final class Environment { return Configuration.implicit(configuration); } - /// Returns a module that represents the top-level members defined in [this], + /// Returns a module that represents the top-level members defined in `this`, /// that contains [css] and [preModuleComments] as its CSS, which can be /// extended using [extensionStore]. Module toModule( @@ -808,7 +808,7 @@ final class Environment { forwarded: _forwardedModules.andThen((modules) => MapKeySet(modules))); } - /// Returns a module with the same members and upstream modules as [this], but + /// Returns a module with the same members and upstream modules as `this`, but /// an empty stylesheet and extension store. /// /// This is used when resolving imports, since they need to inject forwarded diff --git a/lib/src/extend/extension_store.dart b/lib/src/extend/extension_store.dart index 2bbc2a9cb..c450bb7e8 100644 --- a/lib/src/extend/extension_store.dart +++ b/lib/src/extend/extension_store.dart @@ -386,12 +386,12 @@ class ExtensionStore { } } - /// Extends [this] with all the extensions in [extensions]. + /// Extends `this` with all the extensions in [extensions]. /// - /// These extensions will extend all selectors already in [this], but they + /// These extensions will extend all selectors already in `this`, but they /// will *not* extend other extensions from [extensionStores]. void addExtensions(Iterable extensionStores) { - // Extensions already in [this] whose extenders are extended by + // Extensions already in `this` whose extenders are extended by // [extensions], and thus which need to be updated. List? extensionsToExtend; @@ -966,8 +966,8 @@ class ExtensionStore { return specificity; } - /// Returns a copy of [this] that extends new selectors, as well as a map - /// (with reference equality) from the selectors extended by [this] to the + /// Returns a copy of `this` that extends new selectors, as well as a map + /// (with reference equality) from the selectors extended by `this` to the /// selectors extended by the new [ExtensionStore]. (ExtensionStore, Map>) clone() { var newSelectors = >>{}; diff --git a/lib/src/stylesheet_graph.dart b/lib/src/stylesheet_graph.dart index 3109fc5f0..245d8b146 100644 --- a/lib/src/stylesheet_graph.dart +++ b/lib/src/stylesheet_graph.dart @@ -385,7 +385,7 @@ class StylesheetNode { _upstreamImports = newUpstreamImports; } - /// Removes [this] as an upstream and downstream node from all the nodes that + /// Removes `this` as an upstream and downstream node from all the nodes that /// import it and that it imports. void _remove() { for (var node in {...upstream.values, ...upstreamImports.values}) { diff --git a/lib/src/util/map.dart b/lib/src/util/map.dart index a61c151df..865b213bc 100644 --- a/lib/src/util/map.dart +++ b/lib/src/util/map.dart @@ -5,7 +5,7 @@ import 'option.dart'; extension MapExtensions on Map { - /// If [this] doesn't contain the given [key], sets that key to [value] and + /// If `this` doesn't contain the given [key], sets that key to [value] and /// returns it. /// /// Otherwise, calls [merge] with the existing value and [value] and sets diff --git a/lib/src/util/multi_span.dart b/lib/src/util/multi_span.dart index 24ca42b48..41121042a 100644 --- a/lib/src/util/multi_span.dart +++ b/lib/src/util/multi_span.dart @@ -70,7 +70,7 @@ class MultiSpan implements FileSpan { primaryColor: primaryColor, secondaryColor: secondaryColor); - /// Returns a copy of [this] with [newPrimary] as its primary span. + /// Returns a copy of `this` with [newPrimary] as its primary span. MultiSpan _withPrimary(FileSpan newPrimary) => MultiSpan._(newPrimary, primaryLabel, secondarySpans); } diff --git a/lib/src/util/nullable.dart b/lib/src/util/nullable.dart index ad4a8ba2f..cf24c880e 100644 --- a/lib/src/util/nullable.dart +++ b/lib/src/util/nullable.dart @@ -3,7 +3,7 @@ // https://opensource.org/licenses/MIT. extension NullableExtension on T? { - /// If [this] is `null`, returns `null`. Otherwise, runs [fn] and returns its + /// If `this` is `null`, returns `null`. Otherwise, runs [fn] and returns its /// result. /// /// Based on Rust's `Option.and_then`. diff --git a/lib/src/util/span.dart b/lib/src/util/span.dart index bcb9b6165..6328f4aed 100644 --- a/lib/src/util/span.dart +++ b/lib/src/util/span.dart @@ -84,10 +84,10 @@ extension SpanExtensions on FileSpan { return subspan(scanner.position).trimLeft(); } - /// Whether [this] FileSpan contains the [target] FileSpan. + /// Whether this [FileSpan] contains the [target] FileSpan. /// /// Validates the FileSpans to be in the same file and for the [target] to be - /// within [this] FileSpan inclusive range [start,end]. + /// within this [FileSpan]'s inclusive range `[start,end]`. bool contains(FileSpan target) => file.url == target.file.url && start.offset <= target.start.offset && diff --git a/lib/src/value.dart b/lib/src/value.dart index 3149435a0..1161ebbbe 100644 --- a/lib/src/value.dart +++ b/lib/src/value.dart @@ -100,7 +100,7 @@ abstract class Value { @internal bool get isVar => false; - /// Returns Dart's `null` value if this is [sassNull], and returns [this] + /// Returns Dart's `null` value if this is [sassNull], and returns `this` /// otherwise. Value? get realNull => this; @@ -148,7 +148,7 @@ abstract class Value { return index < 0 ? lengthAsList + index : index - 1; } - /// Throws a [SassScriptException] if [this] isn't a boolean. + /// Throws a [SassScriptException] if `this` isn't a boolean. /// /// Note that generally, functions should use [isTruthy] rather than requiring /// a literal boolean. @@ -158,53 +158,53 @@ abstract class Value { SassBoolean assertBoolean([String? name]) => throw SassScriptException("$this is not a boolean.", name); - /// Throws a [SassScriptException] if [this] isn't a calculation. + /// Throws a [SassScriptException] if `this` isn't a calculation. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassCalculation assertCalculation([String? name]) => throw SassScriptException("$this is not a calculation.", name); - /// Throws a [SassScriptException] if [this] isn't a color. + /// Throws a [SassScriptException] if `this` isn't a color. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassColor assertColor([String? name]) => throw SassScriptException("$this is not a color.", name); - /// Throws a [SassScriptException] if [this] isn't a function reference. + /// Throws a [SassScriptException] if `this` isn't a function reference. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassFunction assertFunction([String? name]) => throw SassScriptException("$this is not a function reference.", name); - /// Throws a [SassScriptException] if [this] isn't a mixin reference. + /// Throws a [SassScriptException] if `this` isn't a mixin reference. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassMixin assertMixin([String? name]) => throw SassScriptException("$this is not a mixin reference.", name); - /// Throws a [SassScriptException] if [this] isn't a map. + /// Throws a [SassScriptException] if `this` isn't a map. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassMap assertMap([String? name]) => throw SassScriptException("$this is not a map.", name); - /// Returns [this] as a [SassMap] if it is one (including empty lists, which + /// Returns `this` as a [SassMap] if it is one (including empty lists, which /// count as empty maps) or returns `null` if it's not. SassMap? tryMap() => null; - /// Throws a [SassScriptException] if [this] isn't a number. + /// Throws a [SassScriptException] if `this` isn't a number. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. SassNumber assertNumber([String? name]) => throw SassScriptException("$this is not a number.", name); - /// Throws a [SassScriptException] if [this] isn't a string. + /// Throws a [SassScriptException] if `this` isn't a string. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. @@ -214,7 +214,7 @@ abstract class Value { /// Converts a `selector-parse()`-style input into a string that can be /// parsed. /// - /// Throws a [SassScriptException] if [this] isn't a type or a structure that + /// Throws a [SassScriptException] if `this` isn't a type or a structure that /// can be parsed as a selector. String _selectorString([String? name]) { if (_selectorStringOrNull() case var string?) return string; @@ -228,7 +228,7 @@ abstract class Value { /// Converts a `selector-parse()`-style input into a string that can be /// parsed. /// - /// Returns `null` if [this] isn't a type or a structure that can be parsed as + /// Returns `null` if `this` isn't a type or a structure that can be parsed as /// a selector. String? _selectorStringOrNull() { var self = this; @@ -370,7 +370,7 @@ abstract class Value { @internal Value unaryNot() => sassFalse; - /// Returns a copy of [this] without [SassNumber.asSlash] set. + /// Returns a copy of `this` without [SassNumber.asSlash] set. /// /// If this isn't a [SassNumber], returns it as-is. /// @@ -378,9 +378,9 @@ abstract class Value { @internal Value withoutSlash() => this; - /// Returns a valid CSS representation of [this]. + /// Returns a valid CSS representation of `this`. /// - /// Throws a [SassScriptException] if [this] can't be represented in plain + /// Throws a [SassScriptException] if `this` can't be represented in plain /// CSS. Use [toString] instead to get a string representation even if this /// isn't valid CSS. // @@ -389,11 +389,11 @@ abstract class Value { String toCssString({@internal bool quote = true}) => serializeValue(this, quote: quote); - /// Returns a string representation of [this]. + /// Returns a string representation of `this`. /// /// Note that this is equivalent to calling `inspect()` on the value, and thus /// won't reflect the user's output settings. [toCssString] should be used - /// instead to convert [this] to CSS. + /// instead to convert `this` to CSS. String toString() => serializeValue(this, inspect: true); } @@ -404,7 +404,7 @@ abstract class Value { /// /// {@category Value} extension SassApiValue on Value { - /// Parses [this] as a selector list, in the same manner as the + /// Parses `this` as a selector list, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a @@ -428,7 +428,7 @@ extension SassApiValue on Value { } } - /// Parses [this] as a simple selector, in the same manner as the + /// Parses `this` as a simple selector, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a @@ -453,7 +453,7 @@ extension SassApiValue on Value { } } - /// Parses [this] as a compound selector, in the same manner as the + /// Parses `this` as a compound selector, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a @@ -478,7 +478,7 @@ extension SassApiValue on Value { } } - /// Parses [this] as a complex selector, in the same manner as the + /// Parses `this` as a complex selector, in the same manner as the /// `selector-parse()` function. /// /// Throws a [SassScriptException] if this isn't a type that can be parsed as a diff --git a/lib/src/value/calculation.dart b/lib/src/value/calculation.dart index cbb8b92e6..261400dc2 100644 --- a/lib/src/value/calculation.dart +++ b/lib/src/value/calculation.dart @@ -906,13 +906,13 @@ enum CalculationOperator { /// The division operator. dividedBy('divided by', '/', 2); - /// The English name of [this]. + /// The English name of `this`. final String name; - /// The CSS syntax for [this]. + /// The CSS syntax for `this`. final String operator; - /// The precedence of [this]. + /// The precedence of `this`. /// /// An operator with higher precedence binds tighter. /// diff --git a/lib/src/value/number.dart b/lib/src/value/number.dart index a5c90a501..29f144ad7 100644 --- a/lib/src/value/number.dart +++ b/lib/src/value/number.dart @@ -190,7 +190,7 @@ abstract class SassNumber extends Value { /// The value of this number. /// - /// Note that Sass stores all numbers as [double]s even if if [this] + /// Note that Sass stores all numbers as [double]s even if if `this` /// represents an integer from Sass's perspective. Use [isInt] to determine /// whether this is an integer, [asInt] to get its integer value, or /// [assertInt] to do both at once. @@ -209,14 +209,14 @@ abstract class SassNumber extends Value { /// This number's denominator units. List get denominatorUnits; - /// Whether [this] has any units. + /// Whether `this` has any units. /// /// If a function expects a number to have no units, it should use /// [assertNoUnits]. If it expects the number to have a particular unit, it /// should use [assertUnit]. bool get hasUnits; - /// Whether [this] has more than one numerator unit, or any denominator units. + /// Whether `this` has more than one numerator unit, or any denominator units. /// /// This is `true` for numbers whose units make them unrepresentable as CSS /// lengths. @@ -229,7 +229,7 @@ abstract class SassNumber extends Value { @internal final (SassNumber, SassNumber)? asSlash; - /// Whether [this] is an integer, according to [fuzzyEquals]. + /// Whether `this` is an integer, according to [fuzzyEquals]. /// /// The [int] value can be accessed using [asInt] or [assertInt]. Note that /// this may return `false` for very large doubles even though they may be @@ -237,7 +237,7 @@ abstract class SassNumber extends Value { /// representation for integers that large. bool get isInt => fuzzyIsInt(value); - /// If [this] is an integer according to [isInt], returns [value] as an [int]. + /// If `this` is an integer according to [isInt], returns [value] as an [int]. /// /// Otherwise, returns `null`. int? get asInt => fuzzyAsInt(value); @@ -304,20 +304,20 @@ abstract class SassNumber extends Value { T accept(ValueVisitor visitor) => visitor.visitNumber(this); - /// Returns a number with the same units as [this] but with [value] as its + /// Returns a number with the same units as `this` but with [value] as its /// value. /// /// @nodoc @protected SassNumber withValue(num value); - /// Returns a copy of [this] without [asSlash] set. + /// Returns a copy of `this` without [asSlash] set. /// /// @nodoc @internal SassNumber withoutSlash() => asSlash == null ? this : withValue(value); - /// Returns a copy of [this] with [asSlash] set to a pair containing + /// Returns a copy of `this` with [asSlash] set to a pair containing /// [numerator] and [denominator]. /// /// @nodoc @@ -365,10 +365,10 @@ abstract class SassNumber extends Value { "Expected $this to be within $min$unit and $max$unit.", name); } - /// Returns whether [this] has [unit] as its only unit (and as a numerator). + /// Returns whether `this` has [unit] as its only unit (and as a numerator). bool hasUnit(String unit); - /// Returns whether [this] has units that are compatible with [other]. + /// Returns whether `this` has units that are compatible with [other]. /// /// Unlike [isComparableTo], unitless numbers are only considered compatible /// with other unitless numbers. @@ -378,17 +378,17 @@ abstract class SassNumber extends Value { return isComparableTo(other); } - /// Returns whether [this] has units that are possibly-compatible with + /// Returns whether `this` has units that are possibly-compatible with /// [other], as defined by the Sass spec. @internal bool hasPossiblyCompatibleUnits(SassNumber other); - /// Returns whether [this] can be coerced to the given [unit]. + /// Returns whether `this` can be coerced to the given [unit]. /// /// This always returns `true` for a unitless number. bool compatibleWithUnit(String unit); - /// Throws a [SassScriptException] unless [this] has [unit] as its only unit + /// Throws a [SassScriptException] unless `this` has [unit] as its only unit /// (and as a numerator). /// /// If this came from a function argument, [name] is the argument name @@ -398,7 +398,7 @@ abstract class SassNumber extends Value { throw SassScriptException('Expected $this to have unit "$unit".', name); } - /// Throws a [SassScriptException] unless [this] has no units. + /// Throws a [SassScriptException] unless `this` has no units. /// /// If this came from a function argument, [name] is the argument name /// (without the `$`). It's used for error reporting. @@ -571,7 +571,7 @@ abstract class SassNumber extends Value { /// /// If [other] is passed, it should be the number from which [newNumerators] /// and [newDenominators] are derived. The [name] and [otherName] are the Sass - /// function parameter names of [this] and [other], respectively, used for + /// function parameter names of `this` and [other], respectively, used for /// error reporting. double _coerceOrConvertValue( List newNumerators, List newDenominators, @@ -775,7 +775,7 @@ abstract class SassNumber extends Value { return operation(value, other.coerceValueToMatch(this)); } on SassScriptException { // If the conversion fails, re-run it in the other direction. This will - // generate an error message that prints [this] before [other], which is + // generate an error message that prints `this` before [other], which is // more readable. coerceValueToMatch(other); rethrow; // This should be unreachable.