Skip to content

Commit 67db39c

Browse files
authored
Add a SassArgumentList.keywordsWithoutMarking getter (#1427)
This is necessary to properly forward argument list keywords to the embedded compiler. See sass/embedded-protocol#27
1 parent 390deed commit 67db39c

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 1.37.6
1+
## 1.38.0
22

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

32+
### Dart API
33+
34+
* Add a `SassArgumentList.keywordsWithoutMarking` getter to access the keyword
35+
arguments of an argument list without marking them accessed.
36+
3237
## 1.37.5
3338

3439
* No user-visible changes.

lib/src/value/argument_list.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ class SassArgumentList extends SassList {
2525

2626
final Map<String, Value> _keywords;
2727

28+
/// Returns the same value as [keywords], but doesn't mark them accessed.
29+
///
30+
/// Normally, any time [keywords] is accessed it's marked as such, which
31+
/// indicates that the caller was allowed to pass keywords to a rest argument.
32+
/// This avoids this marking.
33+
Map<String, Value> get keywordsWithoutMarking => _keywords;
34+
2835
/// Whether [keywords] has been accessed.
2936
///
3037
/// This is used to determine whether to throw an exception about passing

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 1.0.0-dev
5+
version: 1.0.0-beta.3
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: '>=2.12.0 <3.0.0'
1111

1212
dependencies:
13-
sass: 1.37.6
13+
sass: 1.38.0
1414

1515
dependency_overrides:
1616
sass: {path: ../..}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.37.6-dev
2+
version: 1.38.0
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)