7e42cbf582
E.g. class Foo extends Bar, Baz {} would before have parsed weirdly,
but it will parse as you'd (probably) expect with an error saying
you cannot do that. For now at least both CFE and Analyzer will
pretend like you just specified the first one but I suppose Analyzer
could for instance use the extra information to propose converting
other ones to implements clauses or similar.
Fixes https://github.com/dart-lang/sdk/issues/22313
Change-Id: I180cdd8ab07143dd74fd21c9976ec2a46c428d8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158261
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
127 lines
6.8 KiB
Plaintext
127 lines
6.8 KiB
Plaintext
parseUnit(class)
|
|
skipErrorTokens(class)
|
|
listener: beginCompilationUnit(class)
|
|
syntheticPreviousToken(class)
|
|
parseTopLevelDeclarationImpl(, Instance of 'DirectiveContext')
|
|
parseMetadataStar()
|
|
listener: beginMetadataStar(class)
|
|
listener: endMetadataStar(0)
|
|
parseTopLevelKeywordDeclaration(, class, Instance of 'DirectiveContext')
|
|
parseClassDeclarationModifiers(, class)
|
|
parseClassOrNamedMixinApplication(null, class)
|
|
listener: beginClassOrNamedMixinApplicationPrelude(class)
|
|
ensureIdentifier(class, classOrMixinDeclaration)
|
|
listener: handleIdentifier(A, classOrMixinDeclaration)
|
|
listener: handleNoTypeVariables({)
|
|
listener: beginClassDeclaration(class, null, A)
|
|
parseClass(A, class, class, A)
|
|
parseClassHeaderOpt(A, class, class)
|
|
parseClassExtendsOpt(A)
|
|
listener: handleNoType(A)
|
|
listener: handleClassExtends(null, 1)
|
|
parseWithClauseOpt(A)
|
|
listener: handleClassNoWithClause()
|
|
parseClassOrMixinImplementsOpt(A)
|
|
listener: handleClassOrMixinImplements(null, 0)
|
|
listener: handleClassHeader(class, class, null)
|
|
parseClassOrMixinOrExtensionBody(A, DeclarationKind.Class, A)
|
|
listener: beginClassOrMixinBody(DeclarationKind.Class, {)
|
|
notEofOrValue(}, })
|
|
listener: endClassOrMixinBody(DeclarationKind.Class, 0, {, })
|
|
listener: endClassDeclaration(class, })
|
|
listener: endTopLevelDeclaration(class)
|
|
parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
|
|
parseMetadataStar(})
|
|
listener: beginMetadataStar(class)
|
|
listener: endMetadataStar(0)
|
|
parseTopLevelKeywordDeclaration(}, class, Instance of 'DirectiveContext')
|
|
parseClassDeclarationModifiers(}, class)
|
|
parseClassOrNamedMixinApplication(null, class)
|
|
listener: beginClassOrNamedMixinApplicationPrelude(class)
|
|
ensureIdentifier(class, classOrMixinDeclaration)
|
|
listener: handleIdentifier(C, classOrMixinDeclaration)
|
|
listener: handleNoTypeVariables(extends)
|
|
listener: beginClassDeclaration(class, null, C)
|
|
parseClass(C, class, class, C)
|
|
parseClassHeaderOpt(C, class, class)
|
|
parseClassExtendsOpt(C)
|
|
listener: handleIdentifier(A, typeReference)
|
|
listener: handleNoTypeArguments({)
|
|
listener: handleType(A, null)
|
|
listener: handleClassExtends(extends, 1)
|
|
parseWithClauseOpt(A)
|
|
listener: handleClassNoWithClause()
|
|
parseClassOrMixinImplementsOpt(A)
|
|
listener: handleClassOrMixinImplements(null, 0)
|
|
listener: handleClassHeader(class, class, null)
|
|
parseClassOrMixinOrExtensionBody(A, DeclarationKind.Class, C)
|
|
listener: beginClassOrMixinBody(DeclarationKind.Class, {)
|
|
notEofOrValue(}, })
|
|
listener: endClassOrMixinBody(DeclarationKind.Class, 0, {, })
|
|
listener: endClassDeclaration(class, })
|
|
listener: endTopLevelDeclaration(extension)
|
|
parseTopLevelDeclarationImpl(}, Instance of 'DirectiveContext')
|
|
parseMetadataStar(})
|
|
listener: beginMetadataStar(extension)
|
|
listener: endMetadataStar(0)
|
|
parseTopLevelKeywordDeclaration(}, extension, Instance of 'DirectiveContext')
|
|
parseTopLevelKeywordModifiers(}, extension)
|
|
parseExtension(extension)
|
|
listener: beginExtensionDeclarationPrelude(extension)
|
|
listener: handleNoTypeVariables(on)
|
|
listener: beginExtensionDeclaration(extension, null)
|
|
listener: handleIdentifier(C, typeReference)
|
|
listener: handleNoTypeArguments({)
|
|
listener: handleType(C, null)
|
|
parseClassOrMixinOrExtensionBody(C, DeclarationKind.Extension, null)
|
|
listener: beginClassOrMixinBody(DeclarationKind.Extension, {)
|
|
notEofOrValue(}, static)
|
|
parseClassOrMixinOrExtensionMemberImpl({, DeclarationKind.Extension, null)
|
|
parseMetadataStar({)
|
|
listener: beginMetadataStar(static)
|
|
listener: endMetadataStar(0)
|
|
listener: beginMember()
|
|
isReservedKeyword(()
|
|
parseMethod({, null, null, static, null, null, null, static, Instance of 'NoType', null, addChild, DeclarationKind.Extension, null, false)
|
|
listener: beginMethod(null, static, null, null, null, addChild)
|
|
listener: handleNoType(static)
|
|
ensureIdentifierPotentiallyRecovered(static, methodDeclaration, false)
|
|
listener: handleIdentifier(addChild, methodDeclaration)
|
|
parseQualifiedRestOpt(addChild, methodDeclarationContinuation)
|
|
parseMethodTypeVar(addChild)
|
|
listener: handleNoTypeVariables(()
|
|
parseGetterOrFormalParameters(addChild, addChild, false, MemberKind.ExtensionStaticMethod)
|
|
parseFormalParameters(addChild, MemberKind.ExtensionStaticMethod)
|
|
parseFormalParametersRest((, MemberKind.ExtensionStaticMethod)
|
|
listener: beginFormalParameters((, MemberKind.ExtensionStaticMethod)
|
|
parseFormalParameter((, FormalParameterKind.mandatory, MemberKind.ExtensionStaticMethod)
|
|
parseMetadataStar(()
|
|
listener: beginMetadataStar(A)
|
|
listener: endMetadataStar(0)
|
|
listener: beginFormalParameter(A, MemberKind.ExtensionStaticMethod, null, null, null)
|
|
listener: handleIdentifier(A, typeReference)
|
|
listener: handleNoTypeArguments(child)
|
|
listener: handleType(A, null)
|
|
ensureIdentifier(A, formalParameterDeclaration)
|
|
listener: handleIdentifier(child, formalParameterDeclaration)
|
|
listener: handleFormalParameterWithoutValue())
|
|
listener: endFormalParameter(null, null, child, null, null, FormalParameterKind.mandatory, MemberKind.ExtensionStaticMethod)
|
|
listener: endFormalParameters(1, (, ), MemberKind.ExtensionStaticMethod)
|
|
parseInitializersOpt())
|
|
listener: handleNoInitializers()
|
|
parseAsyncModifierOpt())
|
|
listener: handleAsyncModifier(null, null)
|
|
inPlainSync()
|
|
parseFunctionBody(), false, false)
|
|
listener: beginBlockFunctionBody({)
|
|
notEofOrValue(}, })
|
|
listener: endBlockFunctionBody(0, {, })
|
|
listener: endExtensionMethod(null, static, (, null, })
|
|
listener: endMember()
|
|
notEofOrValue(}, })
|
|
listener: endClassOrMixinBody(DeclarationKind.Extension, 1, {, })
|
|
listener: endExtensionDeclaration(extension, on, })
|
|
listener: endTopLevelDeclaration()
|
|
reportAllErrorTokens(class)
|
|
listener: endCompilationUnit(3, )
|