Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8618891

Browse files
author
Dart CI
committed
Version 2.18.0-137.0.dev
Merge commit '254b7882a1fba105eaea05f40a8b24d9244210e3' into 'dev'
2 parents 2108000 + 254b788 commit 8618891

File tree

174 files changed

+9123
-2021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+9123
-2021
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ vars = {
153153
"term_glyph_rev": "d0f205c67ea70eea47b9f41c8440129a72a9c86e",
154154
"test_descriptor_rev": "ead23c1e7df079ac0f6457a35f7a71432892e527",
155155
"test_process_rev": "3e695bcfeab551473ddc288970f345f30e5e1375",
156-
"test_reflective_loader_rev": "fcfce37666672edac849d2af6dffc0f8df236a94",
156+
"test_reflective_loader_rev": "8d0de01bbe852fea1f8e33aba907abcba50a8a1e",
157157
"test_rev": "d54846bc2b5cfa4e1445fda85c5e48a00940aa68",
158158
"typed_data_rev": "8b19e29bcf4077147de4d67adeabeb48270c65eb",
159159
"usage_rev": "e85d575d6decb921c57a43b9844bba3607479f56",

pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6332,6 +6332,15 @@ const MessageCode messageInterpolationInUri = const MessageCode(
63326332
analyzerCodes: <String>["INVALID_LITERAL_IN_CONFIGURATION"],
63336333
problemMessage: r"""Can't use string interpolation in a URI.""");
63346334

6335+
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
6336+
const Code<Null> codeInvalidAugmentSuper = messageInvalidAugmentSuper;
6337+
6338+
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
6339+
const MessageCode messageInvalidAugmentSuper = const MessageCode(
6340+
"InvalidAugmentSuper",
6341+
problemMessage:
6342+
r"""'augment super' is only allowed in member augmentations.""");
6343+
63356344
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
63366345
const Code<Null> codeInvalidAwaitFor = messageInvalidAwaitFor;
63376346

pkg/_fe_analyzer_shared/lib/src/parser/forwarding_listener.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,12 @@ class ForwardingListener implements Listener {
17471747
listener?.handleSuperExpression(token, context);
17481748
}
17491749

1750+
@override
1751+
void handleAugmentSuperExpression(
1752+
Token augmentToken, Token superToken, IdentifierContext context) {
1753+
listener?.handleAugmentSuperExpression(augmentToken, superToken, context);
1754+
}
1755+
17501756
@override
17511757
void handleSymbolVoid(Token token) {
17521758
listener?.handleSymbolVoid(token);

pkg/_fe_analyzer_shared/lib/src/parser/listener.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,11 @@ class Listener implements UnescapeErrorListener {
17701770
logEvent("SuperExpression");
17711771
}
17721772

1773+
void handleAugmentSuperExpression(
1774+
Token augmentToken, Token superToken, IdentifierContext context) {
1775+
logEvent("AugmentSuperExpression");
1776+
}
1777+
17731778
void beginSwitchCase(int labelCount, int expressionCount, Token firstToken) {}
17741779

17751780
void endSwitchCase(

pkg/_fe_analyzer_shared/lib/src/parser/modifier_context.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ class ModifierContext {
227227
reportExtraneousModifier(externalToken);
228228
reportExtraneousModifier(requiredToken);
229229
reportExtraneousModifier(staticToken);
230+
reportExtraneousModifier(augmentToken);
230231
return token;
231232
}
232233

pkg/_fe_analyzer_shared/lib/src/parser/parser_impl.dart

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5826,6 +5826,9 @@ class Parser {
58265826
return parseThisExpression(token, context);
58275827
} else if (identical(value, "super")) {
58285828
return parseSuperExpression(token, context);
5829+
} else if (identical(value, "augment") &&
5830+
optional('super', token.next!.next!)) {
5831+
return parseAugmentSuperExpression(token, context);
58295832
} else if (identical(value, "new")) {
58305833
return parseNewExpression(token);
58315834
} else if (identical(value, "const")) {
@@ -5965,6 +5968,21 @@ class Parser {
59655968
return token;
59665969
}
59675970

5971+
Token parseAugmentSuperExpression(Token token, IdentifierContext context) {
5972+
Token augmentToken = token = token.next!;
5973+
assert(optional('augment', token));
5974+
Token superToken = token = token.next!;
5975+
assert(optional('super', token));
5976+
listener.handleAugmentSuperExpression(augmentToken, superToken, context);
5977+
Token next = token.next!;
5978+
if (optional('(', next)) {
5979+
listener.handleNoTypeArguments(next);
5980+
token = parseArguments(token);
5981+
listener.handleSend(augmentToken, token.next!);
5982+
}
5983+
return token;
5984+
}
5985+
59685986
/// This method parses the portion of a list literal starting with the left
59695987
/// square bracket.
59705988
///
@@ -6948,7 +6966,9 @@ class Parser {
69486966
Token? varFinalOrConst;
69496967

69506968
if (isModifier(next)) {
6951-
if (optional('var', next) ||
6969+
if (optional('augment', next) && optional('super', next.next!)) {
6970+
return parseExpressionStatement(start);
6971+
} else if (optional('var', next) ||
69526972
optional('final', next) ||
69536973
optional('const', next)) {
69546974
varFinalOrConst = token = token.next!;

0 commit comments

Comments
 (0)