Index: pkg/front_end/lib/src/fasta/parser/parser.dart |
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart |
index f323b4519c356cb29e55355deacd0e461ec1286a..7b11fe708f4fc37258e0fd36c437822aed3a9dfd 100644 |
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart |
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart |
@@ -3093,15 +3093,24 @@ class Parser { |
token = _injectGenericCommentTypeList(token); |
final String value = token.stringValue; |
if ((identical(value, '[')) || (identical(value, '[]'))) { |
+ listener.beginConstLiteral(token); |
listener.handleNoTypeArguments(token); |
- return parseLiteralListSuffix(token, constKeyword); |
+ token = parseLiteralListSuffix(token, constKeyword); |
+ listener.endConstLiteral(token); |
+ return token; |
} |
if (identical(value, '{')) { |
+ listener.beginConstLiteral(token); |
listener.handleNoTypeArguments(token); |
- return parseLiteralMapSuffix(token, constKeyword); |
+ token = parseLiteralMapSuffix(token, constKeyword); |
+ listener.endConstLiteral(token); |
+ return token; |
} |
if (identical(value, '<')) { |
- return parseLiteralListOrMapOrFunction(token, constKeyword); |
+ listener.beginConstLiteral(token); |
+ token = parseLiteralListOrMapOrFunction(token, constKeyword); |
+ listener.endConstLiteral(token); |
+ return token; |
} |
listener.beginConstExpression(constKeyword); |
token = parseConstructorReference(token); |