Add a SassArgumentList.keywordsWithoutMarking getter (#1427)

This is necessary to properly forward argument list keywords to the
embedded compiler.

See sass/embedded-protocol#27
This commit is contained in:
Natalie Weizenbaum 2021-08-16 23:59:03 +00:00 committed by GitHub
parent 390deed540
commit 67db39c352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View File

@ -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.
@ -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.

View File

@ -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

View File

@ -2,7 +2,7 @@ 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
@ -10,7 +10,7 @@ environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
sass: 1.37.6
sass: 1.38.0
dependency_overrides:
sass: {path: ../..}

View File

@ -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