Skip to content

Commit

Permalink
[Supports General] Disambiguate SupportsCondition/SupportsAnything (#…
Browse files Browse the repository at this point in the history
…2938)

Within parentheses, a production like `#{$value} and ...` could be
parsed as either branch, but *should* be parsed as a
SupportsCondition.

See #2780
  • Loading branch information
nex3 committed Nov 4, 2020
1 parent bda9aed commit 54b9bbe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions accepted/supports-general.changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Draft 2.1

* Forbid `"and"` or `"or"` tokens at the beginning of `InterpolatedAnyValue` in
`SupportsAnything`. This makes more explicit the fact that the
`SupportsCondition` parsing takes precedence.

## Draft 2

* Mark the `InterpolatedAnyValue` productions as optional. According to Tab
Expand Down
5 changes: 3 additions & 2 deletions accepted/supports-general.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `@supports` `<general-enclosed>`: Draft 2.0
# `@supports` `<general-enclosed>`: Draft 2.1

*([Issue](https://github.com/sass/sass/issues/2780), [Changelog](supports-general.changes.md))*

Expand Down Expand Up @@ -151,7 +151,8 @@ ambiguous with a declaration and thus with raw SassScript.

2: This `InterpolatedIdentifier` may not be the identifier `"not"`.

3: This `InterpolatedAnyValue` may not contain a top-level `":"`.
3: This `InterpolatedAnyValue` may not contain a top-level `":"`, and it may not
begin with the identifier tokens `"and"` or `"or"`.

4: This `InterpolatedIdentifier` may not be the identifier `"not"`. No
whitespace is allowed between it and the following `"("`.
Expand Down

0 comments on commit 54b9bbe

Please sign in to comment.