This repository was archived by the owner on Nov 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +7
-40
lines changed Expand file tree Collapse file tree 6 files changed +7
-40
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.16.0
2
+
3
+ - Removed support for the shadow-piercing comibnators ` /deep/ ` and ` >>> ` . These
4
+ were dropped from the Shadow DOM specification.
5
+
1
6
## 0.15.0
2
7
3
8
- ** BREAKING**
Original file line number Diff line number Diff line change @@ -1374,30 +1374,13 @@ class _Parser {
1374
1374
combinatorType = TokenKind .COMBINATOR_PLUS ;
1375
1375
break ;
1376
1376
case TokenKind .GREATER :
1377
- // Parse > or >>>
1378
1377
_eat (TokenKind .GREATER );
1379
- if (_maybeEat (TokenKind .GREATER )) {
1380
- _eat (TokenKind .GREATER );
1381
- combinatorType = TokenKind .COMBINATOR_SHADOW_PIERCING_DESCENDANT ;
1382
- } else {
1383
- combinatorType = TokenKind .COMBINATOR_GREATER ;
1384
- }
1378
+ combinatorType = TokenKind .COMBINATOR_GREATER ;
1385
1379
break ;
1386
1380
case TokenKind .TILDE :
1387
1381
_eat (TokenKind .TILDE );
1388
1382
combinatorType = TokenKind .COMBINATOR_TILDE ;
1389
1383
break ;
1390
- case TokenKind .SLASH :
1391
- // Parse /deep/
1392
- _eat (TokenKind .SLASH );
1393
- var ate = _maybeEat (TokenKind .IDENTIFIER );
1394
- var tok = ate ? _previousToken : _peekToken;
1395
- if (! (ate && tok.text == 'deep' )) {
1396
- _error ('expected deep, but found ${tok .text }' , tok.span);
1397
- }
1398
- _eat (TokenKind .SLASH );
1399
- combinatorType = TokenKind .COMBINATOR_DEEP ;
1400
- break ;
1401
1384
case TokenKind .AMPERSAND :
1402
1385
_eat (TokenKind .AMPERSAND );
1403
1386
thisOperator = true ;
Original file line number Diff line number Diff line change @@ -100,10 +100,8 @@ class TokenKind {
100
100
static const int COMBINATOR_PLUS = 515 ; // + combinator
101
101
static const int COMBINATOR_GREATER = 516 ; // > combinator
102
102
static const int COMBINATOR_TILDE = 517 ; // ~ combinator
103
- static const int COMBINATOR_SHADOW_PIERCING_DESCENDANT = 518 ; // >>>
104
- static const int COMBINATOR_DEEP = 519 ; // /deep/ (aliases >>>)
105
103
106
- static const int UNARY_OP_NONE = 520 ; // No unary operator present.
104
+ static const int UNARY_OP_NONE = 518 ; // No unary operator present.
107
105
108
106
// Attribute match types:
109
107
static const int INCLUDES = 530 ; // '~='
Original file line number Diff line number Diff line change @@ -120,16 +120,9 @@ class SimpleSelectorSequence extends TreeNode {
120
120
bool get isCombinatorTilde => combinator == TokenKind .COMBINATOR_TILDE ;
121
121
bool get isCombinatorDescendant =>
122
122
combinator == TokenKind .COMBINATOR_DESCENDANT ;
123
- bool get isCombinatorDeep => combinator == TokenKind .COMBINATOR_DEEP ;
124
- bool get isCombinatorShadowPiercingDescendant =>
125
- combinator == TokenKind .COMBINATOR_SHADOW_PIERCING_DESCENDANT ;
126
123
127
124
String get _combinatorToString {
128
125
switch (combinator) {
129
- case TokenKind .COMBINATOR_SHADOW_PIERCING_DESCENDANT :
130
- return ' >>> ' ;
131
- case TokenKind .COMBINATOR_DEEP :
132
- return ' /deep/ ' ;
133
126
case TokenKind .COMBINATOR_DESCENDANT :
134
127
return ' ' ;
135
128
case TokenKind .COMBINATOR_GREATER :
Original file line number Diff line number Diff line change @@ -320,10 +320,6 @@ class _TreePrinter extends Visitor {
320
320
output.writeValue ('combinator' , ">" );
321
321
} else if (node.isCombinatorTilde) {
322
322
output.writeValue ('combinator' , "~" );
323
- } else if (node.isCombinatorShadowPiercingDescendant) {
324
- output.writeValue ('combinator' , '>>>' );
325
- } else if (node.isCombinatorDeep) {
326
- output.writeValue ('combinator' , '/deep/' );
327
323
} else {
328
324
output.writeValue ('combinator' , "ERROR UNKNOWN" );
329
325
}
Original file line number Diff line number Diff line change @@ -58,14 +58,6 @@ void testSelectorSuccesses() {
58
58
selectorAst = selector (':host-context(.foo)' , errors: errors..clear ());
59
59
expect (errors.isEmpty, true , reason: errors.toString ());
60
60
expect (compactOuptut (selectorAst), ':host-context(.foo)' );
61
-
62
- selectorAst = selector ('.a /deep/ .b' , errors: errors..clear ());
63
- expect (errors.isEmpty, true , reason: errors.toString ());
64
- expect (compactOuptut (selectorAst), '.a /deep/ .b' );
65
-
66
- selectorAst = selector ('.x >>> .y' , errors: errors..clear ());
67
- expect (errors.isEmpty, true , reason: errors.toString ());
68
- expect (compactOuptut (selectorAst), '.x >>> .y' );
69
61
}
70
62
71
63
// TODO(terry): Move this failure case to a failure_test.dart when the analyzer
You can’t perform that action at this time.
0 commit comments