Skip to content

Commit 9a5b4f5

Browse files
committed
Properly add ParenthesizedExpression for comma-separated lists
1 parent 4e9e206 commit 9a5b4f5

File tree

7 files changed

+23
-7
lines changed

7 files changed

+23
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.89.1
2+
3+
* No user-visible changes.
4+
15
## 1.89.0
26

37
* Allow the Node package importer to load files even when there are multiple

lib/src/parse/stylesheet.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,6 +2396,7 @@ abstract class StylesheetParser extends Parser {
23962396
var start = scanner.state;
23972397
scanner.expectChar($lparen);
23982398
whitespace(consumeNewlines: true);
2399+
var inside = scanner.state;
23992400
if (!_lookingAtExpression()) {
24002401
scanner.expectChar($rparen);
24012402
return ListExpression(
@@ -2425,12 +2426,13 @@ abstract class StylesheetParser extends Parser {
24252426
whitespace(consumeNewlines: true);
24262427
}
24272428

2428-
scanner.expectChar($rparen);
2429-
return ListExpression(
2429+
var list = ListExpression(
24302430
expressions,
24312431
ListSeparator.comma,
2432-
scanner.spanFrom(start),
2432+
scanner.spanFrom(inside),
24332433
);
2434+
scanner.expectChar($rparen);
2435+
return ParenthesizedExpression(list, scanner.spanFrom(start));
24342436
} finally {
24352437
_inParentheses = wasInParentheses;
24362438
}

pkg/sass-parser/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.4.23
2+
3+
* **Potentially-breaking bug fix**: parenthesized, comma-separated lists are now
4+
correctly wrapped in a `ParenthesizedExpression`.
5+
16
## 0.4.22
27

38
* No user-visible changes.

pkg/sass-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-parser",
3-
"version": "0.4.22",
3+
"version": "0.4.23",
44
"description": "A PostCSS-compatible wrapper of the official Sass parser",
55
"repository": "sass/sass",
66
"author": "Google Inc.",

pkg/sass_api/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 15.7.0
2+
3+
* **Potentially-breaking bug fix**: parenthesized, comma-separated lists are now
4+
correctly wrapped in a `ParenthesizedExpression`.
5+
16
## 15.6.0
27

38
* No user-visible changes.

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: 15.6.0
5+
version: 15.7.0
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=3.6.0 <4.0.0"
1111

1212
dependencies:
13-
sass: 1.89.0
13+
sass: 1.89.1
1414

1515
dev_dependencies:
1616
dartdoc: ^8.0.14

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.89.0
2+
version: 1.89.1
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)