From a021b99fc3cd2dd5a403dfecbc2fd4ae4be0f6c1 Mon Sep 17 00:00:00 2001 From: Johnni Winther Date: Wed, 29 Jul 2020 09:04:24 +0000 Subject: [PATCH] [cfe] Fix scope setup for generic function types Closes #36870 Closes #41951 Closes #42364 Change-Id: Id323bfdc26c688bfeb756ef8c1e0530283b44e34 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156028 Reviewed-by: Jens Johansen Commit-Queue: Johnni Winther --- .../lib/src/parser/type_info_impl.dart | 2 +- .../issue_41265.crash_dart.expect | 2 +- .../issue_41265.crash_dart.intertwined.expect | 2 +- .../keyword_named_typedefs.dart.expect | 136 +- ...ord_named_typedefs.dart.intertwined.expect | 136 +- .../general/generic_function_typedef.dart | 41 + .../generic_function_typedef.dart.expect | 984 ++++++++++++ ...c_function_typedef.dart.intertwined.expect | 1396 +++++++++++++++++ ...eneric_function_typedef.dart.parser.expect | 77 + ...neric_function_typedef.dart.scanner.expect | 77 + .../test/fasta/parser/type_info_test.dart | 58 +- .../general/generic_function_typedef.dart | 41 + ...neric_function_typedef.dart.outline.expect | 36 + ...eneric_function_typedef.dart.strong.expect | 35 + ...ion_typedef.dart.strong.transformed.expect | 35 + ...nction_typedef.dart.textual_outline.expect | 32 + ...pedef.dart.textual_outline_modelled.expect | 32 + 17 files changed, 2954 insertions(+), 168 deletions(-) create mode 100644 pkg/front_end/parser_testcases/general/generic_function_typedef.dart create mode 100644 pkg/front_end/parser_testcases/general/generic_function_typedef.dart.expect create mode 100644 pkg/front_end/parser_testcases/general/generic_function_typedef.dart.intertwined.expect create mode 100644 pkg/front_end/parser_testcases/general/generic_function_typedef.dart.parser.expect create mode 100644 pkg/front_end/parser_testcases/general/generic_function_typedef.dart.scanner.expect create mode 100644 pkg/front_end/testcases/general/generic_function_typedef.dart create mode 100644 pkg/front_end/testcases/general/generic_function_typedef.dart.outline.expect create mode 100644 pkg/front_end/testcases/general/generic_function_typedef.dart.strong.expect create mode 100644 pkg/front_end/testcases/general/generic_function_typedef.dart.strong.transformed.expect create mode 100644 pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline.expect create mode 100644 pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline_modelled.expect diff --git a/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart b/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart index ec8e355e51c..d05ecbc9a3d 100644 --- a/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart +++ b/pkg/_fe_analyzer_shared/lib/src/parser/type_info_impl.dart @@ -486,10 +486,10 @@ class ComplexTypeInfo implements TypeInfo { final List typeVariableEndGroups = []; for (Link t = typeVariableStarters; t.isNotEmpty; t = t.tail) { + parser.listener.beginFunctionType(start); typeVariableEndGroups.add( computeTypeParamOrArg(t.head, /* inDeclaration = */ true) .parseVariables(t.head, parser)); - parser.listener.beginFunctionType(start); } if (gftHasReturnType == false) { diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect index d5d26ac6e06..885081bcb0a 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.expect @@ -60,8 +60,8 @@ beginCompilationUnit(class) handleType(Object, null) handleClassExtends(extends) beginTypeList(M) - handleNoTypeVariables(() beginFunctionType(M) + handleNoTypeVariables(() handleIdentifier(M, typeReference) beginTypeArguments(<) handleIdentifier(dynamic, typeReference) diff --git a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect index 52766bcd86c..bceda2e8915 100644 --- a/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/issue_41265.crash_dart.intertwined.expect @@ -92,8 +92,8 @@ parseUnit(class) parseWithClauseOpt(Object) parseTypeList(with) listener: beginTypeList(M) - listener: handleNoTypeVariables(() listener: beginFunctionType(M) + listener: handleNoTypeVariables(() ensureIdentifier(with, typeReference) listener: handleIdentifier(M, typeReference) listener: beginTypeArguments(<) diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect index 5aa54f37ea6..5a39839343e 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.expect @@ -482,8 +482,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'abstract'., null, {token: abstract}], abstract, abstract) handleIdentifier(abstract, typedefDeclaration) handleNoTypeVariables(=) - handleNoTypeVariables(() beginFunctionType(void) + handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -507,8 +507,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'as'., null, {token: as}], as, as) handleIdentifier(as, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -532,8 +532,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'assert'., null, {token: assert}], assert, assert) handleIdentifier(assert, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -555,8 +555,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(async, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -578,8 +578,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(await, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -603,8 +603,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'break'., null, {token: break}], break, break) handleIdentifier(break, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -628,8 +628,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'case'., null, {token: case}], case, case) handleIdentifier(case, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -653,8 +653,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'catch'., null, {token: catch}], catch, catch) handleIdentifier(catch, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -678,8 +678,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'class'., null, {token: class}], class, class) handleIdentifier(class, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -703,8 +703,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'const'., null, {token: const}], const, const) handleIdentifier(const, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -728,8 +728,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'continue'., null, {token: continue}], continue, continue) handleIdentifier(continue, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -753,8 +753,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'covariant'., null, {token: covariant}], covariant, covariant) handleIdentifier(covariant, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -778,8 +778,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'default'., null, {token: default}], default, default) handleIdentifier(default, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -803,8 +803,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'deferred'., null, {token: deferred}], deferred, deferred) handleIdentifier(deferred, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -828,8 +828,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'do'., null, {token: do}], do, do) handleIdentifier(do, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -853,8 +853,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'dynamic'., null, {token: dynamic}], dynamic, dynamic) handleIdentifier(dynamic, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -878,8 +878,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'else'., null, {token: else}], else, else) handleIdentifier(else, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -903,8 +903,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'enum'., null, {token: enum}], enum, enum) handleIdentifier(enum, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -928,8 +928,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'export'., null, {token: export}], export, export) handleIdentifier(export, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -953,8 +953,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extends'., null, {token: extends}], extends, extends) handleIdentifier(extends, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -978,8 +978,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extension'., null, {token: extension}], extension, extension) handleIdentifier(extension, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1003,8 +1003,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'external'., null, {token: external}], external, external) handleIdentifier(external, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1028,8 +1028,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'factory'., null, {token: factory}], factory, factory) handleIdentifier(factory, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1053,8 +1053,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'false'., null, {token: false}], false, false) handleIdentifier(false, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1078,8 +1078,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'final'., null, {token: final}], final, final) handleIdentifier(final, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1103,8 +1103,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'finally'., null, {token: finally}], finally, finally) handleIdentifier(finally, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1128,8 +1128,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'for'., null, {token: for}], for, for) handleIdentifier(for, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1153,8 +1153,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'Function'., null, {token: Function}], Function, Function) handleIdentifier(Function, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1178,8 +1178,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'get'., null, {token: get}], get, get) handleIdentifier(get, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1201,8 +1201,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(hide, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1226,8 +1226,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'if'., null, {token: if}], if, if) handleIdentifier(if, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1251,8 +1251,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'implements'., null, {token: implements}], implements, implements) handleIdentifier(implements, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1276,8 +1276,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'import'., null, {token: import}], import, import) handleIdentifier(import, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1301,8 +1301,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'in'., null, {token: in}], in, in) handleIdentifier(in, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1324,8 +1324,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(inout, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1349,8 +1349,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'interface'., null, {token: interface}], interface, interface) handleIdentifier(interface, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1374,8 +1374,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'is'., null, {token: is}], is, is) handleIdentifier(is, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1399,8 +1399,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'late'., null, {token: late}], late, late) handleIdentifier(late, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1424,8 +1424,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'library'., null, {token: library}], library, library) handleIdentifier(library, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1449,8 +1449,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'mixin'., null, {token: mixin}], mixin, mixin) handleIdentifier(mixin, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1472,8 +1472,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(native, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1497,8 +1497,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'new'., null, {token: new}], new, new) handleIdentifier(new, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1522,8 +1522,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'null'., null, {token: null}], null, null) handleIdentifier(null, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1545,8 +1545,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(of, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1568,8 +1568,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(on, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1593,8 +1593,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'operator'., null, {token: operator}], operator, operator) handleIdentifier(operator, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1616,8 +1616,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(out, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1641,8 +1641,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'part'., null, {token: part}], part, part) handleIdentifier(part, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1664,8 +1664,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(patch, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1689,8 +1689,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'required'., null, {token: required}], required, required) handleIdentifier(required, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1714,8 +1714,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'rethrow'., null, {token: rethrow}], rethrow, rethrow) handleIdentifier(rethrow, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1739,8 +1739,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'return'., null, {token: return}], return, return) handleIdentifier(return, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1764,8 +1764,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'set'., null, {token: set}], set, set) handleIdentifier(set, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1787,8 +1787,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(show, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1810,8 +1810,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(source, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1835,8 +1835,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'static'., null, {token: static}], static, static) handleIdentifier(static, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1860,8 +1860,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'super'., null, {token: super}], super, super) handleIdentifier(super, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1885,8 +1885,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'switch'., null, {token: switch}], switch, switch) handleIdentifier(switch, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1908,8 +1908,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(sync, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1933,8 +1933,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'this'., null, {token: this}], this, this) handleIdentifier(this, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1958,8 +1958,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'throw'., null, {token: throw}], throw, throw) handleIdentifier(throw, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -1983,8 +1983,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'true'., null, {token: true}], true, true) handleIdentifier(true, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -2008,8 +2008,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'try'., null, {token: try}], try, try) handleIdentifier(try, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -2033,8 +2033,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'typedef'., null, {token: typedef}], typedef, typedef) handleIdentifier(typedef, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -2058,8 +2058,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'var'., null, {token: var}], var, var) handleIdentifier(var, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -2127,8 +2127,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'while'., null, {token: while}], while, while) handleIdentifier(while, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -2152,8 +2152,8 @@ beginFunctionTypeAlias(typedef) handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with) handleIdentifier(with, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) @@ -2175,8 +2175,8 @@ endMetadataStar(0) beginFunctionTypeAlias(typedef) handleIdentifier(yield, typedefDeclaration) handleNoTypeVariables(=) -handleNoTypeVariables(() beginFunctionType(void) +handleNoTypeVariables(() handleVoidKeyword(void) beginFormalParameters((, MemberKind.GeneralizedFunctionType) endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) diff --git a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect index eea917ae23a..80fc68798bb 100644 --- a/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect +++ b/pkg/front_end/parser_testcases/error_recovery/keyword_named_typedefs.dart.intertwined.expect @@ -36,8 +36,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'abstract'., null, {token: abstract}], abstract, abstract) listener: handleIdentifier(abstract, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -81,8 +81,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'as'., null, {token: as}], as, as) listener: handleIdentifier(as, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -126,8 +126,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'assert'., null, {token: assert}], assert, assert) listener: handleIdentifier(assert, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -167,8 +167,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(async, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -208,8 +208,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(await, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -253,8 +253,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'break'., null, {token: break}], break, break) listener: handleIdentifier(break, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -298,8 +298,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'case'., null, {token: case}], case, case) listener: handleIdentifier(case, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -343,8 +343,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'catch'., null, {token: catch}], catch, catch) listener: handleIdentifier(catch, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -388,8 +388,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'class'., null, {token: class}], class, class) listener: handleIdentifier(class, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -433,8 +433,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'const'., null, {token: const}], const, const) listener: handleIdentifier(const, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -478,8 +478,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'continue'., null, {token: continue}], continue, continue) listener: handleIdentifier(continue, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -523,8 +523,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'covariant'., null, {token: covariant}], covariant, covariant) listener: handleIdentifier(covariant, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -568,8 +568,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'default'., null, {token: default}], default, default) listener: handleIdentifier(default, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -613,8 +613,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'deferred'., null, {token: deferred}], deferred, deferred) listener: handleIdentifier(deferred, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -658,8 +658,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'do'., null, {token: do}], do, do) listener: handleIdentifier(do, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -703,8 +703,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'dynamic'., null, {token: dynamic}], dynamic, dynamic) listener: handleIdentifier(dynamic, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -748,8 +748,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'else'., null, {token: else}], else, else) listener: handleIdentifier(else, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -793,8 +793,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'enum'., null, {token: enum}], enum, enum) listener: handleIdentifier(enum, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -838,8 +838,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'export'., null, {token: export}], export, export) listener: handleIdentifier(export, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -883,8 +883,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extends'., null, {token: extends}], extends, extends) listener: handleIdentifier(extends, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -928,8 +928,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'extension'., null, {token: extension}], extension, extension) listener: handleIdentifier(extension, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -973,8 +973,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'external'., null, {token: external}], external, external) listener: handleIdentifier(external, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1018,8 +1018,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'factory'., null, {token: factory}], factory, factory) listener: handleIdentifier(factory, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1063,8 +1063,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'false'., null, {token: false}], false, false) listener: handleIdentifier(false, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1108,8 +1108,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'final'., null, {token: final}], final, final) listener: handleIdentifier(final, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1153,8 +1153,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'finally'., null, {token: finally}], finally, finally) listener: handleIdentifier(finally, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1198,8 +1198,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'for'., null, {token: for}], for, for) listener: handleIdentifier(for, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1243,8 +1243,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'Function'., null, {token: Function}], Function, Function) listener: handleIdentifier(Function, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1288,8 +1288,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'get'., null, {token: get}], get, get) listener: handleIdentifier(get, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1329,8 +1329,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(hide, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1374,8 +1374,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'if'., null, {token: if}], if, if) listener: handleIdentifier(if, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1419,8 +1419,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'implements'., null, {token: implements}], implements, implements) listener: handleIdentifier(implements, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1464,8 +1464,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'import'., null, {token: import}], import, import) listener: handleIdentifier(import, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1509,8 +1509,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'in'., null, {token: in}], in, in) listener: handleIdentifier(in, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1550,8 +1550,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(inout, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1595,8 +1595,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'interface'., null, {token: interface}], interface, interface) listener: handleIdentifier(interface, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1640,8 +1640,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'is'., null, {token: is}], is, is) listener: handleIdentifier(is, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1685,8 +1685,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'late'., null, {token: late}], late, late) listener: handleIdentifier(late, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1730,8 +1730,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'library'., null, {token: library}], library, library) listener: handleIdentifier(library, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1775,8 +1775,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'mixin'., null, {token: mixin}], mixin, mixin) listener: handleIdentifier(mixin, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1816,8 +1816,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(native, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1861,8 +1861,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'new'., null, {token: new}], new, new) listener: handleIdentifier(new, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1906,8 +1906,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'null'., null, {token: null}], null, null) listener: handleIdentifier(null, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1947,8 +1947,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(of, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -1988,8 +1988,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(on, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2033,8 +2033,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'operator'., null, {token: operator}], operator, operator) listener: handleIdentifier(operator, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2074,8 +2074,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(out, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2119,8 +2119,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'part'., null, {token: part}], part, part) listener: handleIdentifier(part, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2160,8 +2160,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(patch, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2205,8 +2205,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'required'., null, {token: required}], required, required) listener: handleIdentifier(required, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2250,8 +2250,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'rethrow'., null, {token: rethrow}], rethrow, rethrow) listener: handleIdentifier(rethrow, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2295,8 +2295,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'return'., null, {token: return}], return, return) listener: handleIdentifier(return, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2340,8 +2340,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'set'., null, {token: set}], set, set) listener: handleIdentifier(set, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2381,8 +2381,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(show, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2422,8 +2422,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(source, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2467,8 +2467,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'static'., null, {token: static}], static, static) listener: handleIdentifier(static, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2512,8 +2512,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'super'., null, {token: super}], super, super) listener: handleIdentifier(super, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2557,8 +2557,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'switch'., null, {token: switch}], switch, switch) listener: handleIdentifier(switch, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2598,8 +2598,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(sync, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2643,8 +2643,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'this'., null, {token: this}], this, this) listener: handleIdentifier(this, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2688,8 +2688,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'throw'., null, {token: throw}], throw, throw) listener: handleIdentifier(throw, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2733,8 +2733,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'true'., null, {token: true}], true, true) listener: handleIdentifier(true, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2778,8 +2778,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'try'., null, {token: try}], try, try) listener: handleIdentifier(try, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2823,8 +2823,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'typedef'., null, {token: typedef}], typedef, typedef) listener: handleIdentifier(typedef, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -2868,8 +2868,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'var'., null, {token: var}], var, var) listener: handleIdentifier(var, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -3001,8 +3001,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'while'., null, {token: while}], while, while) listener: handleIdentifier(while, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -3046,8 +3046,8 @@ parseUnit(typedef) listener: handleRecoverableError(Message[ExpectedIdentifier, Expected an identifier, but got 'with'., null, {token: with}], with, with) listener: handleIdentifier(with, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) @@ -3087,8 +3087,8 @@ parseUnit(typedef) ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) listener: handleIdentifier(yield, typedefDeclaration) listener: handleNoTypeVariables(=) - listener: handleNoTypeVariables(() listener: beginFunctionType(void) + listener: handleNoTypeVariables(() listener: handleVoidKeyword(void) parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart new file mode 100644 index 00000000000..4cdd14e2308 --- /dev/null +++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +typedef E1 = void Function(); +typedef E2 = void Function(); +typedef E3 = void Function(); +typedef E4 = void Function(); +typedef E5 = void Function(); +typedef E6 = void Function(); + +typedef F1 = void Function(); +typedef F2 = void Function(); +typedef F3 = void Function(); +typedef F4 = void Function(); +typedef F5 = void Function(); +typedef F6 = void Function(); + +typedef G1 = void Function(); +typedef G2 = void Function(); +typedef G3 = void Function(); +typedef G4 = void + Function(); +typedef G5 = void Function(); +typedef G6 = void Function(); + +typedef H1 = void Function(void Function()); +typedef H2 = void Function(void Function()); +typedef H3 = void Function(void Function()); +typedef H4 = void Function(void Function()); +typedef H5 = void Function(void Function()); +typedef H6 = void Function(void Function()); + +void Function() f1; +void Function() f2; +void Function() f3; +void Function() f4; +void Function() f5; +void Function() f6; + +main() {} diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.expect new file mode 100644 index 00000000000..e210455fcc0 --- /dev/null +++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.expect @@ -0,0 +1,984 @@ +beginCompilationUnit(typedef) + beginMetadataStar(typedef) + endMetadataStar(0) + beginFunctionTypeAlias(typedef) + handleIdentifier(E1, typedefDeclaration) + beginTypeVariables(<) + beginMetadataStar(T) + endMetadataStar(0) + handleIdentifier(T, typeVariableDeclaration) + beginTypeVariable(T) + handleTypeVariablesDefined(T, 1) + handleNoType(T) + endTypeVariable(>, 0, null, null) + endTypeVariables(<, >) + beginFunctionType(void) + handleNoTypeVariables(() + handleVoidKeyword(void) + beginFormalParameters((, MemberKind.GeneralizedFunctionType) + endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + endFunctionType(Function, null) + endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) + handleIdentifier(E2, typedefDeclaration) + beginTypeVariables(<) + beginMetadataStar(T) + endMetadataStar(0) + handleIdentifier(T, typeVariableDeclaration) + beginTypeVariable(T) + handleTypeVariablesDefined(num, 1) + handleIdentifier(num, typeReference) + handleNoTypeArguments(>) + handleType(num, null) + endTypeVariable(>, 0, extends, null) + endTypeVariables(<, >) + beginFunctionType(void) + handleNoTypeVariables(() + handleVoidKeyword(void) + beginFormalParameters((, MemberKind.GeneralizedFunctionType) + endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(E3, typedefDeclaration) +beginTypeVariables(<) + beginMetadataStar(T) + endMetadataStar(0) + handleIdentifier(T, typeVariableDeclaration) + beginTypeVariable(T) + beginMetadataStar(S) + endMetadataStar(0) + handleIdentifier(S, typeVariableDeclaration) + beginTypeVariable(S) + handleTypeVariablesDefined(S, 2) + handleNoType(S) + endTypeVariable(>, 1, null, null) + handleNoType(T) + endTypeVariable(,, 0, null, null) +endTypeVariables(<, >) +beginFunctionType(void) + handleNoTypeVariables(() + handleVoidKeyword(void) + beginFormalParameters((, MemberKind.GeneralizedFunctionType) + endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(E4, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) + beginMetadataStar(S) + endMetadataStar(0) + handleIdentifier(S, typeVariableDeclaration) + beginTypeVariable(S) + handleTypeVariablesDefined(num, 2) + handleIdentifier(num, typeReference) + handleNoTypeArguments(>) + handleType(num, null) + endTypeVariable(>, 1, extends, null) + handleIdentifier(num, typeReference) + handleNoTypeArguments(,) + handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(E5, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) + handleTypeVariablesDefined(num, 2) + handleIdentifier(num, typeReference) + handleNoTypeArguments(>) + handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(S, typeReference) +handleNoTypeArguments(,) +handleType(S, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(E6, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(T, 2) +handleIdentifier(T, typeReference) +handleNoTypeArguments(>) +handleType(T, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(F1, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(T, 1) +handleNoType(T) +endTypeVariable(>, 0, null, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(F2, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(num, 1) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(F3, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(S, 2) +handleNoType(S) +endTypeVariable(>, 1, null, null) +handleNoType(T) +endTypeVariable(,, 0, null, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(F4, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(num, 2) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(F5, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(num, 2) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(S, typeReference) +handleNoTypeArguments(,) +handleType(S, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(F6, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(T, 2) +handleIdentifier(T, typeReference) +handleNoTypeArguments(>) +handleType(T, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(G1, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(X) +endMetadataStar(0) +handleIdentifier(X, typeVariableDeclaration) +beginTypeVariable(X) +handleTypeVariablesDefined(X, 1) +handleNoType(X) +endTypeVariable(>, 0, null, null) +endTypeVariables(<, >) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(X, 1) +handleIdentifier(X, typeReference) +handleNoTypeArguments(>) +handleType(X, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(G2, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(X) +endMetadataStar(0) +handleIdentifier(X, typeVariableDeclaration) +beginTypeVariable(X) +handleTypeVariablesDefined(num, 1) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(X, 1) +handleIdentifier(X, typeReference) +handleNoTypeArguments(>) +handleType(X, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(G3, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(X) +endMetadataStar(0) +handleIdentifier(X, typeVariableDeclaration) +beginTypeVariable(X) +beginMetadataStar(Y) +endMetadataStar(0) +handleIdentifier(Y, typeVariableDeclaration) +beginTypeVariable(Y) +handleTypeVariablesDefined(Y, 2) +handleNoType(Y) +endTypeVariable(>, 1, null, null) +handleNoType(X) +endTypeVariable(,, 0, null, null) +endTypeVariables(<, >) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(Y, 2) +handleIdentifier(Y, typeReference) +handleNoTypeArguments(>) +handleType(Y, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(X, typeReference) +handleNoTypeArguments(,) +handleType(X, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(G4, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(X) +endMetadataStar(0) +handleIdentifier(X, typeVariableDeclaration) +beginTypeVariable(X) +beginMetadataStar(Y) +endMetadataStar(0) +handleIdentifier(Y, typeVariableDeclaration) +beginTypeVariable(Y) +handleTypeVariablesDefined(num, 2) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(Y, 2) +handleIdentifier(Y, typeReference) +handleNoTypeArguments(>) +handleType(Y, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(X, typeReference) +handleNoTypeArguments(,) +handleType(X, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(G5, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(X) +endMetadataStar(0) +handleIdentifier(X, typeVariableDeclaration) +beginTypeVariable(X) +handleTypeVariablesDefined(num, 1) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(X, 2) +handleIdentifier(X, typeReference) +handleNoTypeArguments(>) +handleType(X, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(S, typeReference) +handleNoTypeArguments(,) +handleType(S, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(G6, typedefDeclaration) +beginTypeVariables(<) +beginMetadataStar(X) +endMetadataStar(0) +handleIdentifier(X, typeVariableDeclaration) +beginTypeVariable(X) +handleTypeVariablesDefined(num, 1) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(T, 2) +handleIdentifier(T, typeReference) +handleNoTypeArguments(>) +handleType(T, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(X, typeReference) +handleNoTypeArguments(,) +handleType(X, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(H1, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +beginMetadataStar(void) +endMetadataStar(0) +beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(T, 1) +handleNoType(T) +endTypeVariable(>, 0, null, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleNoName()) +handleFormalParameterWithoutValue()) +endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) +endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(H2, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +beginMetadataStar(void) +endMetadataStar(0) +beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(num, 1) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleNoName()) +handleFormalParameterWithoutValue()) +endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) +endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(H3, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +beginMetadataStar(void) +endMetadataStar(0) +beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(S, 2) +handleNoType(S) +endTypeVariable(>, 1, null, null) +handleNoType(T) +endTypeVariable(,, 0, null, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleNoName()) +handleFormalParameterWithoutValue()) +endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) +endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(H4, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +beginMetadataStar(void) +endMetadataStar(0) +beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(num, 2) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleNoName()) +handleFormalParameterWithoutValue()) +endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) +endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(H5, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +beginMetadataStar(void) +endMetadataStar(0) +beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(num, 2) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(S, typeReference) +handleNoTypeArguments(,) +handleType(S, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleNoName()) +handleFormalParameterWithoutValue()) +endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) +endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(typedef) +beginMetadataStar(typedef) +endMetadataStar(0) +beginFunctionTypeAlias(typedef) +handleIdentifier(H6, typedefDeclaration) +handleNoTypeVariables(=) +beginFunctionType(void) +handleNoTypeVariables(() +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +beginMetadataStar(void) +endMetadataStar(0) +beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(T, 2) +handleIdentifier(T, typeReference) +handleNoTypeArguments(>) +handleType(T, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleNoName()) +handleFormalParameterWithoutValue()) +endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) +endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +endFunctionTypeAlias(typedef, =, ;) +endTopLevelDeclaration(void) +beginMetadataStar(void) +endMetadataStar(0) +beginTopLevelMember(void) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(T, 1) +handleNoType(T) +endTypeVariable(>, 0, null, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleIdentifier(f1, topLevelVariableDeclaration) +handleNoFieldInitializer(;) +endTopLevelFields(null, null, null, null, 1, void, ;) +endTopLevelDeclaration(void) +beginMetadataStar(void) +endMetadataStar(0) +beginTopLevelMember(void) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +handleTypeVariablesDefined(num, 1) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleIdentifier(f2, topLevelVariableDeclaration) +handleNoFieldInitializer(;) +endTopLevelFields(null, null, null, null, 1, void, ;) +endTopLevelDeclaration(void) +beginMetadataStar(void) +endMetadataStar(0) +beginTopLevelMember(void) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(S, 2) +handleNoType(S) +endTypeVariable(>, 1, null, null) +handleNoType(T) +endTypeVariable(,, 0, null, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleIdentifier(f3, topLevelVariableDeclaration) +handleNoFieldInitializer(;) +endTopLevelFields(null, null, null, null, 1, void, ;) +endTopLevelDeclaration(void) +beginMetadataStar(void) +endMetadataStar(0) +beginTopLevelMember(void) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(num, 2) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleIdentifier(f4, topLevelVariableDeclaration) +handleNoFieldInitializer(;) +endTopLevelFields(null, null, null, null, 1, void, ;) +endTopLevelDeclaration(void) +beginMetadataStar(void) +endMetadataStar(0) +beginTopLevelMember(void) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(num, 2) +handleIdentifier(num, typeReference) +handleNoTypeArguments(>) +handleType(num, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(S, typeReference) +handleNoTypeArguments(,) +handleType(S, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleIdentifier(f5, topLevelVariableDeclaration) +handleNoFieldInitializer(;) +endTopLevelFields(null, null, null, null, 1, void, ;) +endTopLevelDeclaration(void) +beginMetadataStar(void) +endMetadataStar(0) +beginTopLevelMember(void) +beginFunctionType(void) +beginTypeVariables(<) +beginMetadataStar(T) +endMetadataStar(0) +handleIdentifier(T, typeVariableDeclaration) +beginTypeVariable(T) +beginMetadataStar(S) +endMetadataStar(0) +handleIdentifier(S, typeVariableDeclaration) +beginTypeVariable(S) +handleTypeVariablesDefined(T, 2) +handleIdentifier(T, typeReference) +handleNoTypeArguments(>) +handleType(T, null) +endTypeVariable(>, 1, extends, null) +handleIdentifier(num, typeReference) +handleNoTypeArguments(,) +handleType(num, null) +endTypeVariable(,, 0, extends, null) +endTypeVariables(<, >) +handleVoidKeyword(void) +beginFormalParameters((, MemberKind.GeneralizedFunctionType) +endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) +endFunctionType(Function, null) +handleIdentifier(f6, topLevelVariableDeclaration) +handleNoFieldInitializer(;) +endTopLevelFields(null, null, null, null, 1, void, ;) +endTopLevelDeclaration(main) +beginMetadataStar(main) +endMetadataStar(0) +beginTopLevelMember(main) +beginTopLevelMethod(;, null) +handleNoType(;) +handleIdentifier(main, topLevelFunctionDeclaration) +handleNoTypeVariables(() +beginFormalParameters((, MemberKind.TopLevelMethod) +endFormalParameters(0, (, ), MemberKind.TopLevelMethod) +handleAsyncModifier(null, null) +beginBlockFunctionBody({) +endBlockFunctionBody(0, {, }) +endTopLevelMethod(main, null, }) +endTopLevelDeclaration() +endCompilationUnit(31, ) diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.intertwined.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.intertwined.expect new file mode 100644 index 00000000000..b6c6730620c --- /dev/null +++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.intertwined.expect @@ -0,0 +1,1396 @@ +parseUnit(typedef) + skipErrorTokens(typedef) + listener: beginCompilationUnit(typedef) + syntheticPreviousToken(typedef) + parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext') + parseMetadataStar() + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(E1, typedefDeclaration) + listener: beginTypeVariables(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(T, 1) + listener: handleNoType(T) + listener: endTypeVariable(>, 0, null, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(E2, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(num, 1) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(E3, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(S, 2) + listener: handleNoType(S) + listener: endTypeVariable(>, 1, null, null) + listener: handleNoType(T) + listener: endTypeVariable(,, 0, null, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(E4, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(E5, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(S, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(S, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(E6, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(T, 2) + listener: handleIdentifier(T, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(T, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(F1, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(T, 1) + listener: handleNoType(T) + listener: endTypeVariable(>, 0, null, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(F2, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(num, 1) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(F3, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(S, 2) + listener: handleNoType(S) + listener: endTypeVariable(>, 1, null, null) + listener: handleNoType(T) + listener: endTypeVariable(,, 0, null, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(F4, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(F5, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(S, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(S, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(F6, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(T, 2) + listener: handleIdentifier(T, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(T, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(G1, typedefDeclaration) + listener: beginTypeVariables(<) + listener: beginMetadataStar(X) + listener: endMetadataStar(0) + listener: handleIdentifier(X, typeVariableDeclaration) + listener: beginTypeVariable(X) + listener: handleTypeVariablesDefined(X, 1) + listener: handleNoType(X) + listener: endTypeVariable(>, 0, null, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(X, 1) + listener: handleIdentifier(X, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(X, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(G2, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(X) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(X, typeVariableDeclaration) + listener: beginTypeVariable(X) + listener: handleTypeVariablesDefined(num, 1) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(X, 1) + listener: handleIdentifier(X, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(X, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(G3, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(X) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(X, typeVariableDeclaration) + listener: beginTypeVariable(X) + parseMetadataStar(,) + listener: beginMetadataStar(Y) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(Y, typeVariableDeclaration) + listener: beginTypeVariable(Y) + listener: handleTypeVariablesDefined(Y, 2) + listener: handleNoType(Y) + listener: endTypeVariable(>, 1, null, null) + listener: handleNoType(X) + listener: endTypeVariable(,, 0, null, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(Y, 2) + listener: handleIdentifier(Y, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(Y, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(X, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(X, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(G4, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(X) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(X, typeVariableDeclaration) + listener: beginTypeVariable(X) + parseMetadataStar(,) + listener: beginMetadataStar(Y) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(Y, typeVariableDeclaration) + listener: beginTypeVariable(Y) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(Y, 2) + listener: handleIdentifier(Y, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(Y, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(X, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(X, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(G5, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(X) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(X, typeVariableDeclaration) + listener: beginTypeVariable(X) + listener: handleTypeVariablesDefined(num, 1) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(X, 2) + listener: handleIdentifier(X, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(X, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(S, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(S, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(G6, typedefDeclaration) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(X) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(X, typeVariableDeclaration) + listener: beginTypeVariable(X) + listener: handleTypeVariablesDefined(num, 1) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(T, 2) + listener: handleIdentifier(T, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(T, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(X, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(X, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(H1, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + parseMetadataStar(() + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(T, 1) + listener: handleNoType(T) + listener: endTypeVariable(>, 0, null, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + listener: handleNoName()) + listener: handleFormalParameterWithoutValue()) + listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(H2, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + parseMetadataStar(() + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(num, 1) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + listener: handleNoName()) + listener: handleFormalParameterWithoutValue()) + listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(H3, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + parseMetadataStar(() + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(S, 2) + listener: handleNoType(S) + listener: endTypeVariable(>, 1, null, null) + listener: handleNoType(T) + listener: endTypeVariable(,, 0, null, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + listener: handleNoName()) + listener: handleFormalParameterWithoutValue()) + listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(H4, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + parseMetadataStar(() + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + listener: handleNoName()) + listener: handleFormalParameterWithoutValue()) + listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(H5, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + parseMetadataStar(() + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(S, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(S, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + listener: handleNoName()) + listener: handleFormalParameterWithoutValue()) + listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(typedef) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(typedef) + listener: endMetadataStar(0) + parseTopLevelKeywordDeclaration(;, typedef, Instance of 'DirectiveContext') + parseTopLevelKeywordModifiers(;, typedef) + parseTypedef(typedef) + listener: beginFunctionTypeAlias(typedef) + ensureIdentifierPotentiallyRecovered(typedef, typedefDeclaration, true) + listener: handleIdentifier(H6, typedefDeclaration) + listener: handleNoTypeVariables(=) + listener: beginFunctionType(void) + listener: handleNoTypeVariables(() + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(Function, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + parseMetadataStar(() + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + listener: beginFormalParameter(void, MemberKind.GeneralizedFunctionType, null, null, null) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(T, 2) + listener: handleIdentifier(T, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(T, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + listener: handleNoName()) + listener: handleFormalParameterWithoutValue()) + listener: endFormalParameter(null, null, ), null, null, FormalParameterKind.mandatory, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(1, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureSemicolon()) + listener: endFunctionTypeAlias(typedef, =, ;) + listener: endTopLevelDeclaration(void) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + parseTopLevelMemberImpl(;) + listener: beginTopLevelMember(void) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f1, DeclarationKind.TopLevel, null, false) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(T, 1) + listener: handleNoType(T) + listener: endTypeVariable(>, 0, null, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false) + listener: handleIdentifier(f1, topLevelVariableDeclaration) + parseFieldInitializerOpt(f1, f1, null, null, null, null, DeclarationKind.TopLevel, null) + listener: handleNoFieldInitializer(;) + listener: endTopLevelFields(null, null, null, null, 1, void, ;) + listener: endTopLevelDeclaration(void) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + parseTopLevelMemberImpl(;) + listener: beginTopLevelMember(void) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f2, DeclarationKind.TopLevel, null, false) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + listener: handleTypeVariablesDefined(num, 1) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false) + listener: handleIdentifier(f2, topLevelVariableDeclaration) + parseFieldInitializerOpt(f2, f2, null, null, null, null, DeclarationKind.TopLevel, null) + listener: handleNoFieldInitializer(;) + listener: endTopLevelFields(null, null, null, null, 1, void, ;) + listener: endTopLevelDeclaration(void) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + parseTopLevelMemberImpl(;) + listener: beginTopLevelMember(void) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f3, DeclarationKind.TopLevel, null, false) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(S, 2) + listener: handleNoType(S) + listener: endTypeVariable(>, 1, null, null) + listener: handleNoType(T) + listener: endTypeVariable(,, 0, null, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false) + listener: handleIdentifier(f3, topLevelVariableDeclaration) + parseFieldInitializerOpt(f3, f3, null, null, null, null, DeclarationKind.TopLevel, null) + listener: handleNoFieldInitializer(;) + listener: endTopLevelFields(null, null, null, null, 1, void, ;) + listener: endTopLevelDeclaration(void) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + parseTopLevelMemberImpl(;) + listener: beginTopLevelMember(void) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f4, DeclarationKind.TopLevel, null, false) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false) + listener: handleIdentifier(f4, topLevelVariableDeclaration) + parseFieldInitializerOpt(f4, f4, null, null, null, null, DeclarationKind.TopLevel, null) + listener: handleNoFieldInitializer(;) + listener: endTopLevelFields(null, null, null, null, 1, void, ;) + listener: endTopLevelDeclaration(void) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + parseTopLevelMemberImpl(;) + listener: beginTopLevelMember(void) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f5, DeclarationKind.TopLevel, null, false) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(num, 2) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(num, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(S, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(S, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false) + listener: handleIdentifier(f5, topLevelVariableDeclaration) + parseFieldInitializerOpt(f5, f5, null, null, null, null, DeclarationKind.TopLevel, null) + listener: handleNoFieldInitializer(;) + listener: endTopLevelFields(null, null, null, null, 1, void, ;) + listener: endTopLevelDeclaration(void) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(void) + listener: endMetadataStar(0) + parseTopLevelMemberImpl(;) + listener: beginTopLevelMember(void) + parseFields(;, null, null, null, null, null, null, ;, Instance of 'ComplexTypeInfo', f6, DeclarationKind.TopLevel, null, false) + listener: beginFunctionType(void) + listener: beginTypeVariables(<) + parseMetadataStar(<) + listener: beginMetadataStar(T) + listener: endMetadataStar(0) + ensureIdentifier(<, typeVariableDeclaration) + listener: handleIdentifier(T, typeVariableDeclaration) + listener: beginTypeVariable(T) + parseMetadataStar(,) + listener: beginMetadataStar(S) + listener: endMetadataStar(0) + ensureIdentifier(,, typeVariableDeclaration) + listener: handleIdentifier(S, typeVariableDeclaration) + listener: beginTypeVariable(S) + listener: handleTypeVariablesDefined(T, 2) + listener: handleIdentifier(T, typeReference) + listener: handleNoTypeArguments(>) + listener: handleType(T, null) + listener: endTypeVariable(>, 1, extends, null) + listener: handleIdentifier(num, typeReference) + listener: handleNoTypeArguments(,) + listener: handleType(num, null) + listener: endTypeVariable(,, 0, extends, null) + listener: endTypeVariables(<, >) + listener: handleVoidKeyword(void) + parseFormalParametersRequiredOpt(>, MemberKind.GeneralizedFunctionType) + parseFormalParametersRest((, MemberKind.GeneralizedFunctionType) + listener: beginFormalParameters((, MemberKind.GeneralizedFunctionType) + listener: endFormalParameters(0, (, ), MemberKind.GeneralizedFunctionType) + listener: endFunctionType(Function, null) + ensureIdentifierPotentiallyRecovered(), topLevelVariableDeclaration, false) + listener: handleIdentifier(f6, topLevelVariableDeclaration) + parseFieldInitializerOpt(f6, f6, null, null, null, null, DeclarationKind.TopLevel, null) + listener: handleNoFieldInitializer(;) + listener: endTopLevelFields(null, null, null, null, 1, void, ;) + listener: endTopLevelDeclaration(main) + parseTopLevelDeclarationImpl(;, Instance of 'DirectiveContext') + parseMetadataStar(;) + listener: beginMetadataStar(main) + listener: endMetadataStar(0) + parseTopLevelMemberImpl(;) + listener: beginTopLevelMember(main) + isReservedKeyword(() + parseTopLevelMethod(;, null, ;, Instance of 'NoType', null, main, false) + listener: beginTopLevelMethod(;, null) + listener: handleNoType(;) + ensureIdentifierPotentiallyRecovered(;, topLevelFunctionDeclaration, false) + listener: handleIdentifier(main, topLevelFunctionDeclaration) + parseMethodTypeVar(main) + listener: handleNoTypeVariables(() + parseGetterOrFormalParameters(main, main, false, MemberKind.TopLevelMethod) + parseFormalParameters(main, MemberKind.TopLevelMethod) + parseFormalParametersRest((, MemberKind.TopLevelMethod) + listener: beginFormalParameters((, MemberKind.TopLevelMethod) + listener: endFormalParameters(0, (, ), MemberKind.TopLevelMethod) + parseAsyncModifierOpt()) + listener: handleAsyncModifier(null, null) + inPlainSync() + parseFunctionBody(), false, false) + listener: beginBlockFunctionBody({) + notEofOrValue(}, }) + listener: endBlockFunctionBody(0, {, }) + listener: endTopLevelMethod(main, null, }) + listener: endTopLevelDeclaration() + reportAllErrorTokens(typedef) + listener: endCompilationUnit(31, ) diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.parser.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.parser.expect new file mode 100644 index 00000000000..ac7315e81ca --- /dev/null +++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.parser.expect @@ -0,0 +1,77 @@ +typedef E1 = void Function(); +typedef E2 = void Function(); +typedef E3 = void Function(); +typedef E4 = void Function(); +typedef E5 = void Function(); +typedef E6 = void Function(); + +typedef F1 = void Function(); +typedef F2 = void Function(); +typedef F3 = void Function(); +typedef F4 = void Function(); +typedef F5 = void Function(); +typedef F6 = void Function(); + +typedef G1 = void Function(); +typedef G2 = void Function(); +typedef G3 = void Function(); +typedef G4 = void +Function(); +typedef G5 = void Function(); +typedef G6 = void Function(); + +typedef H1 = void Function(void Function()); +typedef H2 = void Function(void Function()); +typedef H3 = void Function(void Function()); +typedef H4 = void Function(void Function()); +typedef H5 = void Function(void Function()); +typedef H6 = void Function(void Function()); + +void Function() f1; +void Function() f2; +void Function() f3; +void Function() f4; +void Function() f5; +void Function() f6; + +main() {} + + +typedef[KeywordToken] E1[StringToken]<[BeginToken]T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E2[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E3[StringToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E4[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E5[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E6[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] + +typedef[KeywordToken] F1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] + +typedef[KeywordToken] G1[StringToken]<[BeginToken]X[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G2[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G3[StringToken]<[BeginToken]X[StringToken],[SimpleToken] Y[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G4[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] Y[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] +Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G5[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G6[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] + +typedef[KeywordToken] H1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] + +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f1[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f2[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f3[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f4[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f5[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f6[StringToken];[SimpleToken] + +main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]}[SimpleToken] +[SimpleToken] diff --git a/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.scanner.expect b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.scanner.expect new file mode 100644 index 00000000000..ac7315e81ca --- /dev/null +++ b/pkg/front_end/parser_testcases/general/generic_function_typedef.dart.scanner.expect @@ -0,0 +1,77 @@ +typedef E1 = void Function(); +typedef E2 = void Function(); +typedef E3 = void Function(); +typedef E4 = void Function(); +typedef E5 = void Function(); +typedef E6 = void Function(); + +typedef F1 = void Function(); +typedef F2 = void Function(); +typedef F3 = void Function(); +typedef F4 = void Function(); +typedef F5 = void Function(); +typedef F6 = void Function(); + +typedef G1 = void Function(); +typedef G2 = void Function(); +typedef G3 = void Function(); +typedef G4 = void +Function(); +typedef G5 = void Function(); +typedef G6 = void Function(); + +typedef H1 = void Function(void Function()); +typedef H2 = void Function(void Function()); +typedef H3 = void Function(void Function()); +typedef H4 = void Function(void Function()); +typedef H5 = void Function(void Function()); +typedef H6 = void Function(void Function()); + +void Function() f1; +void Function() f2; +void Function() f3; +void Function() f4; +void Function() f5; +void Function() f6; + +main() {} + + +typedef[KeywordToken] E1[StringToken]<[BeginToken]T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E2[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E3[StringToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E4[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E5[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] E6[StringToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken])[SimpleToken];[SimpleToken] + +typedef[KeywordToken] F1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] F6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] + +typedef[KeywordToken] G1[StringToken]<[BeginToken]X[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G2[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G3[StringToken]<[BeginToken]X[StringToken],[SimpleToken] Y[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G4[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] Y[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] +Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] Y[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G5[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] X[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] G6[StringToken]<[BeginToken]X[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] X[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken];[SimpleToken] + +typedef[KeywordToken] H1[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H2[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H3[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H4[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H5[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] +typedef[KeywordToken] H6[StringToken] =[SimpleToken] void[KeywordToken] Function[KeywordToken]([BeginToken]void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken])[SimpleToken];[SimpleToken] + +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f1[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f2[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken],[SimpleToken] S[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f3[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f4[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] S[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] num[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f5[StringToken];[SimpleToken] +void[KeywordToken] Function[KeywordToken]<[BeginToken]T[StringToken] extends[KeywordToken] num[StringToken],[SimpleToken] S[StringToken] extends[KeywordToken] T[StringToken]>[SimpleToken]([BeginToken])[SimpleToken] f6[StringToken];[SimpleToken] + +main[StringToken]([BeginToken])[SimpleToken] {[BeginToken]}[SimpleToken] +[SimpleToken] diff --git a/pkg/front_end/test/fasta/parser/type_info_test.dart b/pkg/front_end/test/fasta/parser/type_info_test.dart index 5f473d74c81..9aeb4853b16 100644 --- a/pkg/front_end/test/fasta/parser/type_info_test.dart +++ b/pkg/front_end/test/fasta/parser/type_info_test.dart @@ -680,14 +680,15 @@ class TypeInfoTest { void test_computeType_gft() { expectComplexInfo('Function() m', expectedAfter: 'm', expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType Function', + 'handleNoTypeVariables (', 'handleNoType ', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', 'endFunctionType Function null', ]); expectComplexInfo('Function() m', expectedAfter: 'm', expectedCalls: [ + 'beginFunctionType Function', 'beginTypeVariables <', 'beginMetadataStar T', 'endMetadataStar 0', @@ -697,15 +698,14 @@ class TypeInfoTest { 'handleNoType T', 'endTypeVariable > 0 null null', 'endTypeVariables < >', - 'beginFunctionType Function', 'handleNoType ', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', 'endFunctionType Function null', ]); expectComplexInfo('Function(int) m', expectedAfter: 'm', expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType Function', + 'handleNoTypeVariables (', 'handleNoType ', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'beginMetadataStar int', @@ -722,6 +722,7 @@ class TypeInfoTest { 'endFunctionType Function null', ]); expectComplexInfo('Function(int) m', expectedAfter: 'm', expectedCalls: [ + 'beginFunctionType Function', 'beginTypeVariables <', 'beginMetadataStar T', 'endMetadataStar 0', @@ -731,7 +732,6 @@ class TypeInfoTest { 'handleNoType T', 'endTypeVariable > 0 null null', 'endTypeVariables < >', - 'beginFunctionType Function', 'handleNoType ', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'beginMetadataStar int', @@ -774,8 +774,8 @@ class TypeInfoTest { expectComplexInfo('C Function(', // Scanner inserts synthetic ')'. required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments Function', 'handleType C null', @@ -787,8 +787,8 @@ class TypeInfoTest { void test_computeType_identifierComplex_questionMark() { expectComplexInfo('C? Function()', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments ?', 'handleType C ?', @@ -800,8 +800,8 @@ class TypeInfoTest { void test_computeType_identifierComplex_questionMark2() { expectComplexInfo('C Function()?', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments Function', 'handleType C null', @@ -813,8 +813,8 @@ class TypeInfoTest { void test_computeType_identifierComplex_questionMark3() { expectComplexInfo('C? Function()', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'beginTypeArguments <', 'handleIdentifier T typeReference', @@ -830,8 +830,8 @@ class TypeInfoTest { void test_computeType_identifierComplex_questionMark4() { expectComplexInfo('C? Function()', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'beginTypeArguments <', 'handleIdentifier S typeReference', @@ -852,10 +852,10 @@ class TypeInfoTest { expectComplexInfo('C Function()? Function()', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments Function', 'handleType C null', @@ -872,10 +872,10 @@ class TypeInfoTest { expectComplexInfo('C Function() Function()?', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments Function', 'handleType C null', @@ -892,10 +892,10 @@ class TypeInfoTest { expectComplexInfo('C? Function() Function()?', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments ?', 'handleType C ?', @@ -912,10 +912,10 @@ class TypeInfoTest { expectComplexInfo('C Function()? Function()?', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments Function', 'handleType C null', @@ -932,10 +932,10 @@ class TypeInfoTest { expectComplexInfo('C? Function()? Function()?', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'handleNoTypeArguments ?', 'handleType C ?', @@ -1176,8 +1176,8 @@ class TypeInfoTest { expectComplexInfo('C Function(', // Scanner inserts synthetic ')'. required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C typeReference', 'beginTypeArguments <', 'handleIdentifier T typeReference', @@ -1289,8 +1289,8 @@ class TypeInfoTest { expectComplexInfo('C.a Function(', // Scanner inserts synthetic ')'. required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C prefixedTypeReference', 'handleIdentifier a typeReferenceContinuation', 'handleQualified .', @@ -1310,8 +1310,8 @@ class TypeInfoTest { expectComplexInfo('C.a? Function(', // Scanner inserts synthetic ')'. required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType C', + 'handleNoTypeVariables (', 'handleIdentifier C prefixedTypeReference', 'handleIdentifier a typeReferenceContinuation', 'handleQualified .', @@ -1370,6 +1370,7 @@ class TypeInfoTest { expectComplexInfo('C.a Function(int x) Function(int x)', required: true, expectedCalls: [ + 'beginFunctionType C', 'beginTypeVariables <', 'beginMetadataStar T', 'endMetadataStar 0', @@ -1389,7 +1390,6 @@ class TypeInfoTest { 'handleNoType T', 'endTypeVariable > 0 null null', 'endTypeVariables < >', - 'beginFunctionType C', 'handleIdentifier C prefixedTypeReference', 'handleIdentifier a typeReferenceContinuation', 'handleQualified .', @@ -1432,8 +1432,8 @@ class TypeInfoTest { expectComplexInfo('void Function(', // Scanner inserts synthetic ')'. required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType void', + 'handleNoTypeVariables (', 'handleVoidKeyword void', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -1443,8 +1443,8 @@ class TypeInfoTest { void test_computeType_voidComplex() { expectComplexInfo('void Function()', required: true, expectedCalls: [ - 'handleNoTypeVariables (', 'beginFunctionType void', + 'handleNoTypeVariables (', 'handleVoidKeyword void', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -1700,8 +1700,8 @@ class TypeParamOrArgInfoTest { typeArgumentCount: 1, expectedCalls: [ 'beginTypeArguments <', - 'handleNoTypeVariables (', 'beginFunctionType S', + 'handleNoTypeVariables (', 'handleIdentifier S typeReference', 'handleNoTypeArguments Function', 'handleType S null', @@ -1714,8 +1714,8 @@ class TypeParamOrArgInfoTest { typeArgumentCount: 1, expectedCalls: [ 'beginTypeArguments <', - 'handleNoTypeVariables (', 'beginFunctionType void', + 'handleNoTypeVariables (', 'handleVoidKeyword void', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -1825,8 +1825,8 @@ class TypeParamOrArgInfoTest { 'beginTypeArguments <', 'handleIdentifier S typeReference', 'beginTypeArguments <', - 'handleNoTypeVariables (', 'beginFunctionType Function', + 'handleNoTypeVariables (', 'handleNoType <', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -1842,8 +1842,8 @@ class TypeParamOrArgInfoTest { 'beginTypeArguments <', 'handleIdentifier S typeReference', 'beginTypeArguments <', - 'handleNoTypeVariables (', 'beginFunctionType Function', + 'handleNoTypeVariables (', 'handleNoType <', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -1858,8 +1858,8 @@ class TypeParamOrArgInfoTest { 'beginTypeArguments <', 'handleIdentifier S typeReference', 'beginTypeArguments <', - 'handleNoTypeVariables (', 'beginFunctionType void', // was 'beginFunctionType Function' + 'handleNoTypeVariables (', 'handleVoidKeyword void', // was 'handleNoType <' 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -1876,8 +1876,8 @@ class TypeParamOrArgInfoTest { 'beginTypeArguments <', 'handleIdentifier T typeReference', 'beginTypeArguments <', - 'handleNoTypeVariables (', 'beginFunctionType void', // was 'beginFunctionType Function' + 'handleNoTypeVariables (', 'handleVoidKeyword void', // was 'handleNoType <' 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -1897,8 +1897,8 @@ class TypeParamOrArgInfoTest { 'beginTypeArguments <', 'handleIdentifier T typeReference', 'beginTypeArguments <', - 'handleNoTypeVariables (', 'beginFunctionType void', // was 'beginFunctionType Function' + 'handleNoTypeVariables (', 'handleVoidKeyword void', // was 'handleNoType <' 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -2075,8 +2075,8 @@ class TypeParamOrArgInfoTest { 'handleIdentifier S typeVariableDeclaration', 'beginTypeVariable S', 'handleTypeVariablesDefined ) 2', - 'handleNoTypeVariables (', 'beginFunctionType void', + 'handleNoTypeVariables (', 'handleVoidKeyword void', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType', @@ -2329,8 +2329,8 @@ class TypeParamOrArgInfoTest { 'handleIdentifier T typeVariableDeclaration', 'beginTypeVariable T', 'handleTypeVariablesDefined ) 1', - 'handleNoTypeVariables (', 'beginFunctionType Function', + 'handleNoTypeVariables (', 'handleNoType extends', 'beginFormalParameters ( MemberKind.GeneralizedFunctionType', 'beginMetadataStar T', diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart b/pkg/front_end/testcases/general/generic_function_typedef.dart new file mode 100644 index 00000000000..4cdd14e2308 --- /dev/null +++ b/pkg/front_end/testcases/general/generic_function_typedef.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +typedef E1 = void Function(); +typedef E2 = void Function(); +typedef E3 = void Function(); +typedef E4 = void Function(); +typedef E5 = void Function(); +typedef E6 = void Function(); + +typedef F1 = void Function(); +typedef F2 = void Function(); +typedef F3 = void Function(); +typedef F4 = void Function(); +typedef F5 = void Function(); +typedef F6 = void Function(); + +typedef G1 = void Function(); +typedef G2 = void Function(); +typedef G3 = void Function(); +typedef G4 = void + Function(); +typedef G5 = void Function(); +typedef G6 = void Function(); + +typedef H1 = void Function(void Function()); +typedef H2 = void Function(void Function()); +typedef H3 = void Function(void Function()); +typedef H4 = void Function(void Function()); +typedef H5 = void Function(void Function()); +typedef H6 = void Function(void Function()); + +void Function() f1; +void Function() f2; +void Function() f3; +void Function() f4; +void Function() f5; +void Function() f6; + +main() {} diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.outline.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.outline.expect new file mode 100644 index 00000000000..338c05f43cb --- /dev/null +++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.outline.expect @@ -0,0 +1,36 @@ +library; +import self as self; +import "dart:core" as core; + +typedef E1 = () →* void; +typedef E2 = () →* void; +typedef E3 = () →* void; +typedef E4 = () →* void; +typedef E5 = () →* void; +typedef E6 = () →* void; +typedef F1 = () →* void; +typedef F2 = () →* void; +typedef F3 = () →* void; +typedef F4 = () →* void; +typedef F5 = () →* void; +typedef F6 = () →* void; +typedef G1 = () →* void; +typedef G2 = () →* void; +typedef G3 = () →* void; +typedef G4 = () →* void; +typedef G5 = () →* void; +typedef G6 = () →* void; +typedef H1 = (() →* void) →* void; +typedef H2 = (() →* void) →* void; +typedef H3 = (() →* void) →* void; +typedef H4 = (() →* void) →* void; +typedef H5 = (() →* void) →* void; +typedef H6 = (() →* void) →* void; +static field () →* void f1; +static field () →* void f2; +static field () →* void f3; +static field () →* void f4; +static field () →* void f5; +static field () →* void f6; +static method main() → dynamic + ; diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.expect new file mode 100644 index 00000000000..adf2f0d4fc6 --- /dev/null +++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.expect @@ -0,0 +1,35 @@ +library; +import self as self; +import "dart:core" as core; + +typedef E1 = () →* void; +typedef E2 = () →* void; +typedef E3 = () →* void; +typedef E4 = () →* void; +typedef E5 = () →* void; +typedef E6 = () →* void; +typedef F1 = () →* void; +typedef F2 = () →* void; +typedef F3 = () →* void; +typedef F4 = () →* void; +typedef F5 = () →* void; +typedef F6 = () →* void; +typedef G1 = () →* void; +typedef G2 = () →* void; +typedef G3 = () →* void; +typedef G4 = () →* void; +typedef G5 = () →* void; +typedef G6 = () →* void; +typedef H1 = (() →* void) →* void; +typedef H2 = (() →* void) →* void; +typedef H3 = (() →* void) →* void; +typedef H4 = (() →* void) →* void; +typedef H5 = (() →* void) →* void; +typedef H6 = (() →* void) →* void; +static field () →* void f1; +static field () →* void f2; +static field () →* void f3; +static field () →* void f4; +static field () →* void f5; +static field () →* void f6; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.transformed.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.transformed.expect new file mode 100644 index 00000000000..adf2f0d4fc6 --- /dev/null +++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.strong.transformed.expect @@ -0,0 +1,35 @@ +library; +import self as self; +import "dart:core" as core; + +typedef E1 = () →* void; +typedef E2 = () →* void; +typedef E3 = () →* void; +typedef E4 = () →* void; +typedef E5 = () →* void; +typedef E6 = () →* void; +typedef F1 = () →* void; +typedef F2 = () →* void; +typedef F3 = () →* void; +typedef F4 = () →* void; +typedef F5 = () →* void; +typedef F6 = () →* void; +typedef G1 = () →* void; +typedef G2 = () →* void; +typedef G3 = () →* void; +typedef G4 = () →* void; +typedef G5 = () →* void; +typedef G6 = () →* void; +typedef H1 = (() →* void) →* void; +typedef H2 = (() →* void) →* void; +typedef H3 = (() →* void) →* void; +typedef H4 = (() →* void) →* void; +typedef H5 = (() →* void) →* void; +typedef H6 = (() →* void) →* void; +static field () →* void f1; +static field () →* void f2; +static field () →* void f3; +static field () →* void f4; +static field () →* void f5; +static field () →* void f6; +static method main() → dynamic {} diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline.expect new file mode 100644 index 00000000000..fd63028993a --- /dev/null +++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline.expect @@ -0,0 +1,32 @@ +typedef E1 = void Function(); +typedef E2 = void Function(); +typedef E3 = void Function(); +typedef E4 = void Function(); +typedef E5 = void Function(); +typedef E6 = void Function(); +typedef F1 = void Function(); +typedef F2 = void Function(); +typedef F3 = void Function(); +typedef F4 = void Function(); +typedef F5 = void Function(); +typedef F6 = void Function(); +typedef G1 = void Function(); +typedef G2 = void Function(); +typedef G3 = void Function(); +typedef G4 = void + Function(); +typedef G5 = void Function(); +typedef G6 = void Function(); +typedef H1 = void Function(void Function()); +typedef H2 = void Function(void Function()); +typedef H3 = void Function(void Function()); +typedef H4 = void Function(void Function()); +typedef H5 = void Function(void Function()); +typedef H6 = void Function(void Function()); +void Function() f1; +void Function() f2; +void Function() f3; +void Function() f4; +void Function() f5; +void Function() f6; +main() {} diff --git a/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline_modelled.expect new file mode 100644 index 00000000000..5df2b1e84db --- /dev/null +++ b/pkg/front_end/testcases/general/generic_function_typedef.dart.textual_outline_modelled.expect @@ -0,0 +1,32 @@ +main() {} +typedef E1 = void Function(); +typedef E2 = void Function(); +typedef E3 = void Function(); +typedef E4 = void Function(); +typedef E5 = void Function(); +typedef E6 = void Function(); +typedef F1 = void Function(); +typedef F2 = void Function(); +typedef F3 = void Function(); +typedef F4 = void Function(); +typedef F5 = void Function(); +typedef F6 = void Function(); +typedef G1 = void Function(); +typedef G2 = void Function(); +typedef G3 = void Function(); +typedef G4 = void + Function(); +typedef G5 = void Function(); +typedef G6 = void Function(); +typedef H1 = void Function(void Function()); +typedef H2 = void Function(void Function()); +typedef H3 = void Function(void Function()); +typedef H4 = void Function(void Function()); +typedef H5 = void Function(void Function()); +typedef H6 = void Function(void Function()); +void Function() f5; +void Function() f6; +void Function() f4; +void Function() f2; +void Function() f3; +void Function() f1;