4ee8852d77
* The 'end' token on endLiteralString is now the last token of the string, not the next unrelated token. * Set the offset of StringConcatenation to the start of the string, not the start of the next unrelated token. * The 'end' token on endBinaryPatterns is renamed to 'operatorToken'. Fixes https://github.com/dart-lang/sdk/issues/55690 Tested: Existing Change-Id: Iae788464008594c21e759570a626971d89688033 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498601 Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com> Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
249 lines
17 KiB
Plaintext
249 lines
17 KiB
Plaintext
parseUnit(main)
|
|
skipErrorTokens(main)
|
|
listener: beginCompilationUnit(main)
|
|
syntheticPreviousToken(main)
|
|
parseTopLevelDeclarationImpl(, DirectiveContext(DirectiveState.Unknown))
|
|
parseMetadataStar()
|
|
listener: beginMetadataStar(main)
|
|
listener: endMetadataStar(0)
|
|
parseTopLevelMemberImpl()
|
|
listener: beginTopLevelMember(main)
|
|
isReservedKeyword(()
|
|
parseTopLevelMethod(, null, null, , NoType(), null, main, false)
|
|
listener: beginTopLevelMethod(, null, 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({)
|
|
notEofOrType(CLOSE_CURLY_BRACKET, final)
|
|
parseStatement({)
|
|
parseStatementX({)
|
|
parseExpressionStatementOrDeclarationAfterModifiers(final, {, null, final, null, null)
|
|
skipOuterPattern(final)
|
|
skipObjectPatternRest(record)
|
|
looksLikeLocalFunction(record)
|
|
listener: beginMetadataStar(final)
|
|
listener: endMetadataStar(0)
|
|
listener: handleNoType(final)
|
|
listener: beginVariablesDeclaration(record, null, final)
|
|
parseVariablesDeclarationRest(final, true)
|
|
parseOptionallyInitializedIdentifier(final)
|
|
ensureIdentifier(final, localVariableDeclaration)
|
|
listener: handleIdentifier(record, localVariableDeclaration)
|
|
listener: beginInitializedIdentifier(record)
|
|
parseVariableInitializerOpt(record)
|
|
listener: beginVariableInitializer(=)
|
|
parseExpression(=)
|
|
looksLikeOuterPatternEquals(=)
|
|
skipOuterPattern(=)
|
|
parsePrecedenceExpression(=, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(=, true, ConstantPatternContext.none)
|
|
parsePrimary(=, expression, ConstantPatternContext.none)
|
|
parseParenthesizedExpressionFunctionLiteralOrRecordLiteral(=, ConstantPatternContext.none)
|
|
parseParenthesizedExpressionOrRecordLiteral(=, null, ConstantPatternContext.none)
|
|
listener: beginParenthesizedExpressionOrRecordLiteral(()
|
|
parseExpression(()
|
|
looksLikeOuterPatternEquals(()
|
|
skipOuterPattern(()
|
|
parsePrecedenceExpression((, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression((, true, ConstantPatternContext.none)
|
|
parsePrimary((, expression, ConstantPatternContext.none)
|
|
parseParenthesizedExpressionFunctionLiteralOrRecordLiteral((, ConstantPatternContext.none)
|
|
parseParenthesizedExpressionOrRecordLiteral((, null, ConstantPatternContext.none)
|
|
listener: beginParenthesizedExpressionOrRecordLiteral(()
|
|
ensureIdentifier((, namedRecordFieldReference)
|
|
listener: handleIdentifier(a, namedRecordFieldReference)
|
|
parseExpression(:)
|
|
looksLikeOuterPatternEquals(:)
|
|
skipOuterPattern(:)
|
|
parsePrecedenceExpression(:, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(:, true, ConstantPatternContext.none)
|
|
parsePrimary(:, expression, ConstantPatternContext.none)
|
|
parseLiteralInt(:)
|
|
listener: handleLiteralInt(1)
|
|
listener: handleNamedRecordField(:)
|
|
ensureIdentifier(,, namedRecordFieldReference)
|
|
listener: handleIdentifier(b, namedRecordFieldReference)
|
|
parseExpression(:)
|
|
looksLikeOuterPatternEquals(:)
|
|
skipOuterPattern(:)
|
|
parsePrecedenceExpression(:, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(:, true, ConstantPatternContext.none)
|
|
parsePrimary(:, expression, ConstantPatternContext.none)
|
|
parseLiteralInt(:)
|
|
listener: handleLiteralInt(2)
|
|
listener: handleNamedRecordField(:)
|
|
ensureCloseParen(2, ()
|
|
listener: endRecordLiteral((, 2, null)
|
|
listener: handlePositionalRecordField(()
|
|
parseExpression(,)
|
|
looksLikeOuterPatternEquals(,)
|
|
skipOuterPattern(,)
|
|
parsePrecedenceExpression(,, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(,, true, ConstantPatternContext.none)
|
|
parsePrimary(,, expression, ConstantPatternContext.none)
|
|
parseLiteralInt(,)
|
|
listener: handleLiteralInt(3)
|
|
listener: handlePositionalRecordField(3)
|
|
ensureCloseParen(3, ()
|
|
listener: endRecordLiteral((, 2, null)
|
|
listener: endVariableInitializer(=)
|
|
listener: endInitializedIdentifier(record)
|
|
ensureSemicolon())
|
|
listener: endVariablesDeclaration(1, ;)
|
|
notEofOrType(CLOSE_CURLY_BRACKET, final)
|
|
parseStatement(;)
|
|
parseStatementX(;)
|
|
parseExpressionStatementOrDeclarationAfterModifiers(final, ;, null, final, null, null)
|
|
skipOuterPattern(final)
|
|
listener: beginMetadataStar(final)
|
|
listener: endMetadataStar(0)
|
|
parsePatternVariableDeclarationStatement(final, ;, final)
|
|
parsePattern(final, PatternContext.declaration, precedence: 1)
|
|
listener: beginPattern(final)
|
|
parsePrimaryPattern(final, PatternContext.declaration)
|
|
parseParenthesizedPatternOrRecordPattern(final, PatternContext.declaration)
|
|
parsePattern((, PatternContext.declaration, precedence: 1)
|
|
listener: beginPattern(()
|
|
parsePrimaryPattern((, PatternContext.declaration)
|
|
parseParenthesizedPatternOrRecordPattern((, PatternContext.declaration)
|
|
listener: handleNoName(()
|
|
parsePattern(:, PatternContext.declaration, precedence: 1)
|
|
listener: beginPattern(:)
|
|
parsePrimaryPattern(:, PatternContext.declaration)
|
|
parseVariablePattern(:, PatternContext.declaration, typeInfo: NoType())
|
|
listener: handleNoType(a)
|
|
listener: handleDeclaredVariablePattern(null, a, false)
|
|
listener: endPattern(a)
|
|
listener: handlePatternField(:)
|
|
listener: handleNoName(,)
|
|
parsePattern(:, PatternContext.declaration, precedence: 1)
|
|
listener: beginPattern(:)
|
|
parsePrimaryPattern(:, PatternContext.declaration)
|
|
parseVariablePattern(:, PatternContext.declaration, typeInfo: NoType())
|
|
listener: handleNoType(b)
|
|
listener: handleDeclaredVariablePattern(null, b, false)
|
|
listener: endPattern(b)
|
|
listener: handlePatternField(:)
|
|
ensureCloseParen(b, ()
|
|
listener: handleRecordPattern((, 2)
|
|
listener: endPattern())
|
|
listener: handlePatternField(null)
|
|
parsePattern(,, PatternContext.declaration, precedence: 1)
|
|
listener: beginPattern(,)
|
|
parsePrimaryPattern(,, PatternContext.declaration)
|
|
parseVariablePattern(,, PatternContext.declaration, typeInfo: NoType())
|
|
listener: handleNoType(c)
|
|
listener: handleDeclaredVariablePattern(null, c, false)
|
|
listener: endPattern(c)
|
|
listener: handlePatternField(null)
|
|
ensureCloseParen(c, ()
|
|
listener: handleRecordPattern((, 2)
|
|
listener: endPattern())
|
|
parseExpression(=)
|
|
looksLikeOuterPatternEquals(=)
|
|
skipOuterPattern(=)
|
|
skipObjectPatternRest(record)
|
|
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(record, expression)
|
|
listener: handleNoTypeArguments(;)
|
|
parseArgumentsOpt(record)
|
|
listener: handleNoArguments(;)
|
|
listener: handleSend(record, record)
|
|
ensureSemicolon(record)
|
|
listener: handlePatternVariableDeclarationStatement(final, =, ;)
|
|
notEofOrType(CLOSE_CURLY_BRACKET, print)
|
|
parseStatement(;)
|
|
parseStatementX(;)
|
|
parseExpressionStatementOrDeclarationAfterModifiers(;, ;, null, null, null, null)
|
|
looksLikeLocalFunction(print)
|
|
parseExpressionStatement(;)
|
|
parseExpression(;)
|
|
looksLikeOuterPatternEquals(;)
|
|
skipOuterPattern(;)
|
|
skipObjectPatternRest(print)
|
|
parsePrecedenceExpression(;, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression(;, true, ConstantPatternContext.none)
|
|
parsePrimary(;, expression, ConstantPatternContext.none)
|
|
parseSendOrFunctionLiteral(;, expression, ConstantPatternContext.none)
|
|
looksLikeFunctionBody(;)
|
|
parseSend(;, expression, ConstantPatternContext.none)
|
|
ensureIdentifier(;, expression)
|
|
listener: handleIdentifier(print, expression)
|
|
listener: handleNoTypeArguments(()
|
|
parseArgumentsOpt(print)
|
|
parseArguments(print)
|
|
parseArgumentsRest(()
|
|
listener: beginArguments(()
|
|
allowedToShortcutParseExpression()
|
|
parseExpression(()
|
|
looksLikeOuterPatternEquals(()
|
|
skipOuterPattern(()
|
|
parsePrecedenceExpression((, 1, true, ConstantPatternContext.none)
|
|
parseUnaryExpression((, true, ConstantPatternContext.none)
|
|
parsePrimary((, expression, ConstantPatternContext.none)
|
|
parseLiteralString(()
|
|
parseSingleLiteralString(()
|
|
listener: beginLiteralString("a = )
|
|
parseIdentifierExpression($)
|
|
parseSend($, expression, ConstantPatternContext.none)
|
|
ensureIdentifier($, expression)
|
|
listener: handleIdentifier(a, expression)
|
|
listener: handleNoTypeArguments(; b = )
|
|
parseArgumentsOpt(a)
|
|
listener: handleNoArguments(; b = )
|
|
listener: handleSend(a, a)
|
|
listener: handleInterpolationExpression($, null)
|
|
parseStringPart(a)
|
|
listener: handleStringPart(; b = )
|
|
parseIdentifierExpression($)
|
|
parseSend($, expression, ConstantPatternContext.none)
|
|
ensureIdentifier($, expression)
|
|
listener: handleIdentifier(b, expression)
|
|
listener: handleNoTypeArguments(, c = )
|
|
parseArgumentsOpt(b)
|
|
listener: handleNoArguments(, c = )
|
|
listener: handleSend(b, b)
|
|
listener: handleInterpolationExpression($, null)
|
|
parseStringPart(b)
|
|
listener: handleStringPart(, c = )
|
|
parseIdentifierExpression($)
|
|
parseSend($, expression, ConstantPatternContext.none)
|
|
ensureIdentifier($, expression)
|
|
listener: handleIdentifier(c, expression)
|
|
listener: handleNoTypeArguments(")
|
|
parseArgumentsOpt(c)
|
|
listener: handleNoArguments(")
|
|
listener: handleSend(c, c)
|
|
listener: handleInterpolationExpression($, null)
|
|
parseStringPart(c)
|
|
listener: handleStringPart(")
|
|
listener: endLiteralString(3, ")
|
|
listener: handlePositionalArgument("a = )
|
|
listener: endArguments(1, (, ))
|
|
listener: handleSend(print, ))
|
|
ensureSemicolon())
|
|
listener: handleExpressionStatement(print, ;)
|
|
notEofOrType(CLOSE_CURLY_BRACKET, })
|
|
listener: endBlockFunctionBody(3, {, })
|
|
listener: endTopLevelMethod(main, null, })
|
|
listener: endTopLevelDeclaration(})
|
|
reportAllErrorTokens(main)
|
|
listener: endCompilationUnit(1, )
|