Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Jan 15, 2020
1 parent 5957a57 commit aa18e65
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/src/ast/node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ abstract class AstNode {
/// Returns an [AstNode] that doesn't have any data and whose span is
/// generated by [callback].
///
/// Anumber of APIs take [AstNode]s instead of spans because computing spans
/// A number of APIs take [AstNode]s instead of spans because computing spans
/// eagerly can be expensive. This allows arbitrary spans to be passed to
/// those callbacks while sitll being lazily computed.
/// those callbacks while still being lazily computed.
factory AstNode.fake(FileSpan Function() callback) = _FakeAstNode;

AstNode();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/async_environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ class AsyncEnvironment {
/// If [namespace] is passed, the module is made available under that
/// namespace.
///
/// Throws a [SassException] if there's already a module with the given
/// Throws a [SassScriptException] if there's already a module with the given
/// [namespace], or if [namespace] is `null` and [module] defines a variable
/// with the same name as a variable defined in this environment.
void addModule(Module module, AstNode nodeWithSpan, {String namespace}) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/callable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export 'callable/user_defined.dart';
/// access a string's length in code points.
@sealed
abstract class Callable extends AsyncCallable {
@Deprecated('Use `new Callable.function` instead.')
@Deprecated('Use `Callable.function` instead.')
factory Callable(String name, String arguments,
ext.Value callback(List<ext.Value> arguments)) =>
Callable.function(name, arguments, callback);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/callable/async.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class AsyncCallable {
/// The callable's name.
String get name;

@Deprecated('Use `new AsyncCallable.function` instead.')
@Deprecated('Use `AsyncCallable.function` instead.')
factory AsyncCallable(String name, String arguments,
FutureOr<ext.Value> callback(List<ext.Value> arguments)) =>
AsyncCallable.function(name, arguments, callback);
Expand Down
3 changes: 2 additions & 1 deletion lib/src/functions/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,8 @@ SassColor _transparentize(List<Value> arguments) {
/// Like [fuzzyRound], but returns `null` if [number] is `null`.
int _fuzzyRoundOrNull(num number) => number == null ? null : fuzzyRound(number);

/// Like [new BuiltInCallable.function], but always sets the URL to `sass:math`.
/// Like [new BuiltInCallable.function], but always sets the URL to
/// `sass:color`.
BuiltInCallable _function(
String name, String arguments, Value callback(List<Value> arguments)) =>
BuiltInCallable.function(name, arguments, callback, url: "sass:color");
2 changes: 1 addition & 1 deletion lib/src/functions/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ final _separator = _function(
final _isBracketed = _function("is-bracketed", r"$list",
(arguments) => SassBoolean(arguments[0].hasBrackets));

/// Like [new BuiltInCallable.function], but always sets the URL to `sass:math`.
/// Like [new BuiltInCallable.function], but always sets the URL to `sass:list`.
BuiltInCallable _function(
String name, String arguments, Value callback(List<Value> arguments)) =>
BuiltInCallable.function(name, arguments, callback, url: "sass:list");
2 changes: 1 addition & 1 deletion lib/src/functions/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ final _hasKey = _function("has-key", r"$map, $key", (arguments) {
return SassBoolean(map.contents.containsKey(key));
});

/// Like [new BuiltInCallable.function], but always sets the URL to `sass:math`.
/// Like [new BuiltInCallable.function], but always sets the URL to `sass:map`.
BuiltInCallable _function(
String name, String arguments, Value callback(List<Value> arguments)) =>
BuiltInCallable.function(name, arguments, callback, url: "sass:map");
2 changes: 1 addition & 1 deletion lib/src/functions/meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final global = UnmodifiableListView([
})
]);

/// Like [new BuiltInCallable.function], but always sets the URL to `sass:math`.
/// Like [new BuiltInCallable.function], but always sets the URL to `sass:meta`.
BuiltInCallable _function(
String name, String arguments, Value callback(List<Value> arguments)) =>
BuiltInCallable.function(name, arguments, callback, url: "sass:meta");
3 changes: 2 additions & 1 deletion lib/src/functions/selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ CompoundSelector _prependParent(CompoundSelector compound) {
}
}

/// Like [new BuiltInCallable.function], but always sets the URL to `sass:math`.
/// Like [new BuiltInCallable.function], but always sets the URL to
/// `sass:selector`.
BuiltInCallable _function(
String name, String arguments, Value callback(List<Value> arguments)) =>
BuiltInCallable.function(name, arguments, callback, url: "sass:selector");
3 changes: 2 additions & 1 deletion lib/src/functions/string.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ int _codepointForIndex(int index, int lengthInCodepoints,
return result;
}

/// Like [new BuiltInCallable.function], but always sets the URL to `sass:math`.
/// Like [new BuiltInCallable.function], but always sets the URL to
/// `sass:string`.
BuiltInCallable _function(
String name, String arguments, Value callback(List<Value> arguments)) =>
BuiltInCallable.function(name, arguments, callback, url: "sass:string");

0 comments on commit aa18e65

Please sign in to comment.