Skip to content

Commit

Permalink
Add a SassArgumentList.keywordsWithoutMarking getter (#1427)
Browse files Browse the repository at this point in the history
This is necessary to properly forward argument list keywords to the
embedded compiler.

See sass/embedded-protocol#27
  • Loading branch information
nex3 committed Aug 16, 2021
1 parent 390deed commit 67db39c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 1.37.6
## 1.38.0

* In expanded mode, emit characters in Unicode private-use areas as escape
sequences rather than literal characters.
Expand Down Expand Up @@ -29,6 +29,11 @@
* Don't crash when an error occurs in a stylesheet loaded via a custom importer
with a custom URL scheme.

### Dart API

* Add a `SassArgumentList.keywordsWithoutMarking` getter to access the keyword
arguments of an argument list without marking them accessed.

## 1.37.5

* No user-visible changes.
Expand Down
7 changes: 7 additions & 0 deletions lib/src/value/argument_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ class SassArgumentList extends SassList {

final Map<String, Value> _keywords;

/// Returns the same value as [keywords], but doesn't mark them accessed.
///
/// Normally, any time [keywords] is accessed it's marked as such, which
/// indicates that the caller was allowed to pass keywords to a rest argument.
/// This avoids this marking.
Map<String, Value> get keywordsWithoutMarking => _keywords;

/// Whether [keywords] has been accessed.
///
/// This is used to determine whether to throw an exception about passing
Expand Down
4 changes: 2 additions & 2 deletions pkg/sass_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: sass_api
# Note: Every time we add a new Sass AST node, we need to bump the *major*
# version because it's a breaking change for anyone who's implementing the
# visitor interface(s).
version: 1.0.0-dev
version: 1.0.0-beta.3
description: Additional APIs for Dart Sass.
homepage: https://github.com/sass/dart-sass

environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:
sass: 1.37.6
sass: 1.38.0

dependency_overrides:
sass: {path: ../..}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.37.6-dev
version: 1.38.0
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit 67db39c

Please sign in to comment.