This repository was archived by the owner on Nov 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -1248,7 +1248,7 @@ class _Parser {
1248
1248
_eat (TokenKind .GREATER );
1249
1249
if (_maybeEat (TokenKind .GREATER )) {
1250
1250
_eat (TokenKind .GREATER );
1251
- combinatorType = TokenKind .COMBINATOR_DEEP ;
1251
+ combinatorType = TokenKind .COMBINATOR_SHADOW_PIERCING_DESCENDANT ;
1252
1252
} else {
1253
1253
combinatorType = TokenKind .COMBINATOR_GREATER ;
1254
1254
}
Original file line number Diff line number Diff line change @@ -100,9 +100,10 @@ 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_DEEP = 518 ; // /deep/ or >>> combinator
103
+ static const int COMBINATOR_SHADOW_PIERCING_DESCENDANT = 518 ; // >>>
104
+ static const int COMBINATOR_DEEP = 519 ; // /deep/ (aliases >>>)
104
105
105
- static const int UNARY_OP_NONE = 519 ; // No unary operator present.
106
+ static const int UNARY_OP_NONE = 520 ; // No unary operator present.
106
107
107
108
// Attribute match types:
108
109
static const int INCLUDES = 530 ; // '~='
Original file line number Diff line number Diff line change @@ -121,11 +121,15 @@ class SimpleSelectorSequence extends TreeNode {
121
121
bool get isCombinatorDescendant =>
122
122
combinator == TokenKind .COMBINATOR_DESCENDANT ;
123
123
bool get isCombinatorDeep => combinator == TokenKind .COMBINATOR_DEEP ;
124
+ bool get isCombinatorShadowPiercingDescendant =>
125
+ combinator == TokenKind .COMBINATOR_SHADOW_PIERCING_DESCENDANT ;
124
126
125
127
String get _combinatorToString {
126
128
switch (combinator) {
127
- case TokenKind .COMBINATOR_DEEP :
129
+ case TokenKind .COMBINATOR_SHADOW_PIERCING_DESCENDANT :
128
130
return ' >>> ' ;
131
+ case TokenKind .COMBINATOR_DEEP :
132
+ return ' /deep/ ' ;
129
133
case TokenKind .COMBINATOR_DESCENDANT :
130
134
return ' ' ;
131
135
case TokenKind .COMBINATOR_GREATER :
Original file line number Diff line number Diff line change @@ -271,8 +271,10 @@ class _TreePrinter extends Visitor {
271
271
output.writeValue ('combinator' , ">" );
272
272
} else if (node.isCombinatorTilde) {
273
273
output.writeValue ('combinator' , "~" );
274
- } else if (node.isCombinatorDeep ) {
274
+ } else if (node.isCombinatorShadowPiercingDescendant ) {
275
275
output.writeValue ('combinator' , '>>>' );
276
+ } else if (node.isCombinatorDeep) {
277
+ output.writeValue ('combinator' , '/deep/' );
276
278
} else {
277
279
output.writeValue ('combinator' , "ERROR UNKNOWN" );
278
280
}
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ void testSelectorSuccesses() {
61
61
62
62
selectorAst = selector ('.a /deep/ .b' , errors: errors..clear ());
63
63
expect (errors.isEmpty, true , reason: errors.toString ());
64
- expect (compactOuptut (selectorAst), '.a >>> .b' );
64
+ expect (compactOuptut (selectorAst), '.a /deep/ .b' );
65
65
66
66
selectorAst = selector ('.x >>> .y' , errors: errors..clear ());
67
67
expect (errors.isEmpty, true , reason: errors.toString ());
You can’t perform that action at this time.
0 commit comments