808b2512b4
This adds a beginConstructor listener method and calls this before constructor instead of beginMethod. This makes it possible for listeners to fully separate handling of constructors from methods. Change-Id: Ibcbcf76ccb6d97314d395c4c0efcb4f9d073519a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462140 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
179 lines
11 KiB
Plaintext
179 lines
11 KiB
Plaintext
parseUnit(class)
|
|
skipErrorTokens(class)
|
|
listener: beginCompilationUnit(class)
|
|
syntheticPreviousToken(class)
|
|
parseTopLevelDeclarationImpl(, DirectiveContext(DirectiveState.Unknown))
|
|
parseMetadataStar()
|
|
listener: beginMetadataStar(class)
|
|
listener: endMetadataStar(0)
|
|
parseTopLevelKeywordDeclaration(class, , class, null, null, null, null, DirectiveContext(DirectiveState.Unknown))
|
|
parseClassOrNamedMixinApplication(class, null, null, null, null, null, null, null, null, class)
|
|
listener: beginClassOrMixinOrNamedMixinApplicationPrelude(class)
|
|
ensureIdentifier(class, classOrMixinDeclaration)
|
|
listener: handleIdentifier(Foo, classOrMixinDeclaration)
|
|
listener: handleNoTypeVariables({)
|
|
listener: beginClassDeclaration(class, null, null, null, null, null, null, null, null, Foo)
|
|
parseClass(Foo, class, class, null, Foo)
|
|
parsePrimaryConstructorOpt(Foo, null, false)
|
|
listener: handleNoPrimaryConstructor(Foo, null, false)
|
|
parseClassHeaderOpt(Foo, class, class)
|
|
parseClassExtendsOpt(Foo, DeclarationHeaderKind.Class)
|
|
listener: handleNoType(Foo)
|
|
listener: handleClassExtends(null, 1)
|
|
parseClassWithClauseOpt(Foo)
|
|
listener: handleClassNoWithClause()
|
|
parseClassOrMixinOrEnumImplementsOpt(Foo)
|
|
listener: handleImplements(null, 0)
|
|
listener: handleClassHeader(class, class, null)
|
|
parseClassOrMixinOrExtensionBody(Foo, DeclarationKind.Class, Foo)
|
|
listener: beginClassOrMixinOrExtensionBody(DeclarationKind.Class, {)
|
|
notEofOrType(CLOSE_CURLY_BRACKET, String)
|
|
parseClassOrMixinOrExtensionOrEnumMemberImpl({, DeclarationKind.Class, Foo)
|
|
parseMetadataStar({)
|
|
listener: beginMetadataStar(String)
|
|
listener: endMetadataStar(0)
|
|
listener: beginMember()
|
|
parseFields({, null, null, null, null, null, null, null, {, SimpleNullableType(), x, DeclarationKind.Class, Foo, false)
|
|
listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, {)
|
|
listener: handleIdentifier(String, typeReference)
|
|
listener: handleNoTypeArguments(?)
|
|
listener: handleType(String, ?)
|
|
ensureIdentifierPotentiallyRecovered(?, fieldDeclaration, false)
|
|
listener: handleIdentifier(x, fieldDeclaration)
|
|
parseFieldInitializerOpt(x, x, null, null, null, null, null, DeclarationKind.Class, Foo)
|
|
listener: handleNoFieldInitializer(;)
|
|
listener: endFields(DeclarationKind.Class, null, null, null, null, null, null, null, 1, String, ;)
|
|
listener: endMember()
|
|
notEofOrType(CLOSE_CURLY_BRACKET, int)
|
|
parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
|
|
parseMetadataStar(;)
|
|
listener: beginMetadataStar(int)
|
|
listener: endMetadataStar(0)
|
|
listener: beginMember()
|
|
parseFields(;, null, null, null, null, null, null, null, ;, SimpleType(), y, DeclarationKind.Class, Foo, false)
|
|
listener: beginFields(DeclarationKind.Class, null, null, null, null, null, null, null, ;)
|
|
listener: handleIdentifier(int, typeReference)
|
|
listener: handleNoTypeArguments(y)
|
|
listener: handleType(int, null)
|
|
ensureIdentifierPotentiallyRecovered(int, fieldDeclaration, false)
|
|
listener: handleIdentifier(y, fieldDeclaration)
|
|
parseFieldInitializerOpt(y, y, null, null, null, null, null, DeclarationKind.Class, Foo)
|
|
listener: handleNoFieldInitializer(;)
|
|
listener: endFields(DeclarationKind.Class, null, null, null, null, null, null, null, 1, int, ;)
|
|
listener: endMember()
|
|
notEofOrType(CLOSE_CURLY_BRACKET, Foo)
|
|
parseClassOrMixinOrExtensionOrEnumMemberImpl(;, DeclarationKind.Class, Foo)
|
|
parseMetadataStar(;)
|
|
listener: beginMetadataStar(Foo)
|
|
listener: endMetadataStar(0)
|
|
listener: beginMember()
|
|
isReservedKeyword(()
|
|
parseMethod(;, null, null, null, null, null, null, null, ;, NoType(), null, Foo, DeclarationKind.Class, Foo, false)
|
|
listener: beginConstructor(DeclarationKind.Class, null, null, null, null, null, null, Foo, Foo)
|
|
listener: handleNoType(;)
|
|
ensureIdentifierPotentiallyRecovered(;, methodDeclaration, false)
|
|
listener: handleIdentifier(Foo, methodDeclaration)
|
|
parseQualifiedRestOpt(Foo, methodDeclarationContinuation)
|
|
parseMethodTypeVar(Foo)
|
|
listener: handleNoTypeVariables(()
|
|
parseGetterOrFormalParameters(Foo, Foo, false, MemberKind.NonStaticMethod)
|
|
parseFormalParameters(Foo, MemberKind.NonStaticMethod)
|
|
parseFormalParametersRest((, MemberKind.NonStaticMethod)
|
|
listener: beginFormalParameters((, MemberKind.NonStaticMethod)
|
|
parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
|
parseMetadataStar(()
|
|
listener: beginMetadataStar(Object)
|
|
listener: endMetadataStar(0)
|
|
listener: beginFormalParameter(Object, MemberKind.NonStaticMethod, null, null, null)
|
|
listener: handleIdentifier(Object, typeReference)
|
|
listener: handleNoTypeArguments(?)
|
|
listener: handleType(Object, ?)
|
|
ensureIdentifier(?, formalParameterDeclaration)
|
|
listener: handleIdentifier(o, formalParameterDeclaration)
|
|
listener: handleFormalParameterWithoutValue())
|
|
listener: endFormalParameter(null, null, null, null, o, null, null, FormalParameterKind.requiredPositional, MemberKind.NonStaticMethod)
|
|
listener: endFormalParameters(1, (, ), MemberKind.NonStaticMethod)
|
|
parseInitializersOpt())
|
|
parseInitializers(:)
|
|
listener: beginInitializers(:)
|
|
parseInitializer(:)
|
|
listener: beginInitializer(x)
|
|
parseInitializerExpressionRest(:)
|
|
parseExpression(:)
|
|
looksLikeOuterPatternEquals(:)
|
|
skipOuterPattern(:)
|
|
skipObjectPatternRest(x)
|
|
parsePrecedenceExpression(:, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(:, true, ConstantPatternContext.none)
|
|
parsePrimary(:, expression, ConstantPatternContext.none)
|
|
parseSendOrFunctionLiteral(:, expression, ConstantPatternContext.none)
|
|
parseSend(:, expression, ConstantPatternContext.none)
|
|
ensureIdentifier(:, expression)
|
|
listener: handleIdentifier(x, expression)
|
|
listener: handleNoTypeArguments(=)
|
|
parseArgumentsOpt(x)
|
|
listener: handleNoArguments(=)
|
|
listener: handleSend(x, x)
|
|
parsePrecedenceExpression(=, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(=, true, ConstantPatternContext.none)
|
|
parsePrimary(=, expression, ConstantPatternContext.none)
|
|
parseSendOrFunctionLiteral(=, expression, ConstantPatternContext.none)
|
|
parseSend(=, expression, ConstantPatternContext.none)
|
|
ensureIdentifier(=, expression)
|
|
listener: handleIdentifier(o, expression)
|
|
listener: handleNoTypeArguments(as)
|
|
parseArgumentsOpt(o)
|
|
listener: handleNoArguments(as)
|
|
listener: handleSend(o, o)
|
|
parseAsOperatorRest(o)
|
|
listener: beginAsOperatorType(as)
|
|
computeTypeAfterIsOrAs(as)
|
|
listener: handleIdentifier(String, typeReference)
|
|
listener: handleNoTypeArguments(,)
|
|
listener: handleType(String, null)
|
|
listener: endAsOperatorType(as)
|
|
listener: handleAsOperator(as)
|
|
skipChainedAsIsOperators(String)
|
|
listener: handleAssignmentExpression(=, String)
|
|
listener: endInitializer(String)
|
|
parseInitializer(,)
|
|
listener: beginInitializer(y)
|
|
parseInitializerExpressionRest(,)
|
|
parseExpression(,)
|
|
looksLikeOuterPatternEquals(,)
|
|
skipOuterPattern(,)
|
|
skipObjectPatternRest(y)
|
|
parsePrecedenceExpression(,, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(,, true, ConstantPatternContext.none)
|
|
parsePrimary(,, expression, ConstantPatternContext.none)
|
|
parseSendOrFunctionLiteral(,, expression, ConstantPatternContext.none)
|
|
parseSend(,, expression, ConstantPatternContext.none)
|
|
ensureIdentifier(,, expression)
|
|
listener: handleIdentifier(y, expression)
|
|
listener: handleNoTypeArguments(=)
|
|
parseArgumentsOpt(y)
|
|
listener: handleNoArguments(=)
|
|
listener: handleSend(y, y)
|
|
parsePrecedenceExpression(=, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(=, true, ConstantPatternContext.none)
|
|
parsePrimary(=, expression, ConstantPatternContext.none)
|
|
parseLiteralInt(=)
|
|
listener: handleLiteralInt(0)
|
|
listener: handleAssignmentExpression(=, 0)
|
|
listener: endInitializer(0)
|
|
listener: endInitializers(2, :, 0)
|
|
parseAsyncModifierOpt(0)
|
|
listener: handleAsyncModifier(null, null)
|
|
inPlainSync()
|
|
inPlainSync()
|
|
parseFunctionBody(0, false, true)
|
|
listener: handleEmptyFunctionBody(;)
|
|
listener: endConstructor(DeclarationKind.Class, Foo, (, :, ;)
|
|
listener: endMember()
|
|
notEofOrType(CLOSE_CURLY_BRACKET, })
|
|
listener: endClassOrMixinOrExtensionBody(DeclarationKind.Class, 3, {, })
|
|
listener: endClassDeclaration(class, })
|
|
listener: endTopLevelDeclaration(})
|
|
reportAllErrorTokens(class)
|
|
listener: endCompilationUnit(1, )
|