Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for the reference combinator. #123

Merged
merged 2 commits into from
Feb 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 1.0.0-alpha.10

* Drop support for the reference combinator. This has been removed from the
spec, and will be deprecated and eventually removed in other implementations.

* Trust type annotations when compiling to JavaScript, which makes it
substantially faster.

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ Sass to update the reference behavior.
where they wouldn't be in Ruby Sass. This better matches the semantics of
the selectors in question, and is more efficient. See [issue 2228][].

12. The reference combinator is not supported. See [issue 303][].

[issue 1599]: https://github.com/sass/sass/issues/1599
[issue 1126]: https://github.com/sass/sass/issues/1126
[issue 2120]: https://github.com/sass/sass/issues/2120
Expand All @@ -184,5 +186,6 @@ Sass to update the reference behavior.
[issue 1408]: https://github.com/sass/sass/issues/1408
[issue 1050]: https://github.com/sass/sass/issues/1050
[issue 2228]: https://github.com/sass/sass/issues/2228
[issue 303]: https://github.com/sass/sass/issues/303

Disclaimer: this is not an official Google product.
12 changes: 0 additions & 12 deletions lib/src/ast/selector/complex.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,3 @@ class Combinator implements ComplexSelectorComponent {

String toString() => _text;
}

/// A reference combinator, like `/for/`.
class ReferenceCombinator implements Combinator {
/// The name of the attribute being selected for.
final String name;

String get _text => "/$name/";

ReferenceCombinator(this.name);

String toString() => _text;
}
6 changes: 0 additions & 6 deletions lib/src/parse/selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ class SelectorParser extends Parser {
components.add(Combinator.followingSibling);
break;

case $slash:
scanner.readChar();
components.add(new ReferenceCombinator(identifier()));
scanner.expectChar($slash);
break;

case $lbracket:
case $dot:
case $hash:
Expand Down