| Index: runtime/vm/parser.cc
|
| ===================================================================
|
| --- runtime/vm/parser.cc (revision 20275)
|
| +++ runtime/vm/parser.cc (working copy)
|
| @@ -9891,9 +9891,15 @@
|
|
|
| void Parser::SkipSelectors() {
|
| while (true) {
|
| - if ((CurrentToken() == Token::kPERIOD) ||
|
| - (CurrentToken() == Token::kCASCADE)) {
|
| + if (CurrentToken() == Token::kCASCADE) {
|
| ConsumeToken();
|
| + if (CurrentToken() == Token::kLBRACK) {
|
| + continue; // Consume [ in next loop iteration.
|
| + } else {
|
| + ExpectIdentifier("identifier or [ expected after ..");
|
| + }
|
| + } else if (CurrentToken() == Token::kPERIOD) {
|
| + ConsumeToken();
|
| ExpectIdentifier("identifier expected");
|
| } else if (CurrentToken() == Token::kLBRACK) {
|
| ConsumeToken();
|
|
|