parseUnit(UnterminatedString("""))
  skipErrorTokens(UnterminatedString("""))
  listener: beginCompilationUnit(void)
  syntheticPreviousToken(void)
  parseTopLevelDeclarationImpl(UnmatchedToken({), DirectiveContext(DirectiveState.Unknown))
    parseMetadataStar(UnmatchedToken({))
      listener: beginMetadataStar(void)
      listener: endMetadataStar(0)
    parseTopLevelMemberImpl(UnmatchedToken({))
      listener: beginTopLevelMember(void)
      parseTopLevelMethod(UnmatchedToken({), null, null, UnmatchedToken({), VoidType(), null, foo, false)
        listener: beginTopLevelMethod(UnmatchedToken({), null, null)
        listener: handleVoidKeyword(void)
        ensureIdentifierPotentiallyRecovered(void, topLevelFunctionDeclaration, false)
          listener: handleIdentifier(foo, topLevelFunctionDeclaration)
        parseMethodTypeVar(foo)
          listener: handleNoTypeVariables(()
        parseGetterOrFormalParameters(foo, foo, false, MemberKind.TopLevelMethod)
          parseFormalParameters(foo, MemberKind.TopLevelMethod)
            parseFormalParametersRest((, MemberKind.TopLevelMethod)
              listener: beginFormalParameters((, MemberKind.TopLevelMethod)
              parseFormalParameter((, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
                parseMetadataStar(()
                  listener: beginMetadataStar(dynamic)
                  listener: endMetadataStar(0)
                listener: beginFormalParameter(dynamic, MemberKind.TopLevelMethod, null, null, null)
                listener: handleIdentifier(dynamic, typeReference)
                listener: handleNoTypeArguments(bar)
                listener: handleType(dynamic, null)
                ensureIdentifier(dynamic, formalParameterDeclaration)
                  listener: handleIdentifier(bar, formalParameterDeclaration)
                listener: handleFormalParameterWithoutValue())
                listener: endFormalParameter(null, null, null, bar, null, null, FormalParameterKind.requiredPositional, MemberKind.TopLevelMethod)
              listener: endFormalParameters(1, (, ), MemberKind.TopLevelMethod)
        parseAsyncModifierOpt())
          listener: handleAsyncModifier(null, null)
          inPlainSync()
        parseFunctionBody(), false, false)
          listener: beginBlockFunctionBody({)
          notEofOrType(CLOSE_CURLY_BRACKET, return)
          parseStatement({)
            parseStatementX({)
              parseReturnStatement({)
                listener: beginReturnStatement(return)
                parseExpression(return)
                  parsePrecedenceExpression(return, 1, true, ConstantPatternContext.none)
                    parseUnaryExpression(return, true, ConstantPatternContext.none)
                      parsePrimary(return, expression, ConstantPatternContext.none)
                        parseLiteralString(return)
                          parseSingleLiteralString(return)
                            listener: beginLiteralString("""æbler)
                            parseIdentifierExpression($)
                              parseSend($, expression, ConstantPatternContext.none)
                                ensureIdentifier($, expression)
                                  listener: handleIdentifier(bar, expression)
                                listener: handleNoTypeArguments(""")
                                parseArgumentsOpt(bar)
                                  listener: handleNoArguments(""")
                                listener: handleSend(bar, bar)
                            listener: handleInterpolationExpression($, null)
                            parseStringPart(bar)
                              listener: handleStringPart(""")
                            listener: endLiteralString(1, })
                ensureSemicolon(""")
                  reportRecoverableError(""", Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}])
                    listener: handleRecoverableError(Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}], """, """)
                  rewriter()
                listener: endReturnStatement(true, return, ;)
                inGenerator()
          notEofOrType(CLOSE_CURLY_BRACKET, })
          listener: endBlockFunctionBody(1, {, })
        listener: endTopLevelMethod(void, null, })
  listener: endTopLevelDeclaration(})
  parseTopLevelDeclarationImpl(}, DirectiveContext(DirectiveState.Declarations))
    parseMetadataStar(})
      listener: beginMetadataStar(void)
      listener: endMetadataStar(0)
    parseTopLevelMemberImpl(})
      listener: beginTopLevelMember(void)
      parseTopLevelMethod(}, null, null, }, VoidType(), null, bar, false)
        listener: beginTopLevelMethod(}, null, null)
        listener: handleVoidKeyword(void)
        ensureIdentifierPotentiallyRecovered(void, topLevelFunctionDeclaration, false)
          listener: handleIdentifier(bar, topLevelFunctionDeclaration)
        parseMethodTypeVar(bar)
          listener: handleNoTypeVariables(()
        parseGetterOrFormalParameters(bar, bar, false, MemberKind.TopLevelMethod)
          parseFormalParameters(bar, 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, return)
          parseStatement({)
            parseStatementX({)
              parseReturnStatement({)
                listener: beginReturnStatement(return)
                parseExpression(return)
                  parsePrecedenceExpression(return, 1, true, ConstantPatternContext.none)
                    parseUnaryExpression(return, true, ConstantPatternContext.none)
                      parsePrimary(return, expression, ConstantPatternContext.none)
                        parseLiteralString(return)
                          parseSingleLiteralString(return)
                            listener: beginLiteralString("""æbler""")
                            listener: endLiteralString(0, })
                ensureSemicolon("""æbler""")
                  reportRecoverableError("""æbler""", Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}])
                    listener: handleRecoverableError(Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}], """æbler""", """æbler""")
                  rewriter()
                listener: endReturnStatement(true, return, ;)
                inGenerator()
          notEofOrType(CLOSE_CURLY_BRACKET, })
          listener: endBlockFunctionBody(1, {, })
        listener: endTopLevelMethod(void, null, })
  listener: endTopLevelDeclaration(})
  parseTopLevelDeclarationImpl(}, DirectiveContext(DirectiveState.Declarations))
    parseMetadataStar(})
      listener: beginMetadataStar(void)
      listener: endMetadataStar(0)
    parseTopLevelMemberImpl(})
      listener: beginTopLevelMember(void)
      parseTopLevelMethod(}, null, null, }, VoidType(), null, baz, false)
        listener: beginTopLevelMethod(}, null, null)
        listener: handleVoidKeyword(void)
        ensureIdentifierPotentiallyRecovered(void, topLevelFunctionDeclaration, false)
          listener: handleIdentifier(baz, topLevelFunctionDeclaration)
        parseMethodTypeVar(baz)
          listener: handleNoTypeVariables(()
        parseGetterOrFormalParameters(baz, baz, false, MemberKind.TopLevelMethod)
          parseFormalParameters(baz, 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, return)
          parseStatement({)
            parseStatementX({)
              parseReturnStatement({)
                listener: beginReturnStatement(return)
                parseExpression(return)
                  parsePrecedenceExpression(return, 1, true, ConstantPatternContext.none)
                    parseUnaryExpression(return, true, ConstantPatternContext.none)
                      parsePrimary(return, expression, ConstantPatternContext.none)
                        parseLiteralString(return)
                          parseSingleLiteralString(return)
                            listener: beginLiteralString(r"""hello""")
                            listener: endLiteralString(0, })
                ensureSemicolon(r"""hello""")
                  reportRecoverableError(r"""hello""", Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}])
                    listener: handleRecoverableError(Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}], r"""hello""", r"""hello""")
                  rewriter()
                listener: endReturnStatement(true, return, ;)
                inGenerator()
          notEofOrType(CLOSE_CURLY_BRACKET, })
          listener: endBlockFunctionBody(1, {, })
        listener: endTopLevelMethod(void, null, })
  listener: endTopLevelDeclaration(})
  parseTopLevelDeclarationImpl(}, DirectiveContext(DirectiveState.Declarations))
    parseMetadataStar(})
      listener: beginMetadataStar(void)
      listener: endMetadataStar(0)
    parseTopLevelMemberImpl(})
      listener: beginTopLevelMember(void)
      parseTopLevelMethod(}, null, null, }, VoidType(), null, qux, false)
        listener: beginTopLevelMethod(}, null, null)
        listener: handleVoidKeyword(void)
        ensureIdentifierPotentiallyRecovered(void, topLevelFunctionDeclaration, false)
          listener: handleIdentifier(qux, topLevelFunctionDeclaration)
        parseMethodTypeVar(qux)
          listener: handleNoTypeVariables(()
        parseGetterOrFormalParameters(qux, qux, false, MemberKind.TopLevelMethod)
          parseFormalParameters(qux, 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, return)
          parseStatement({)
            parseStatementX({)
              parseReturnStatement({)
                listener: beginReturnStatement(return)
                parseExpression(return)
                  parsePrecedenceExpression(return, 1, true, ConstantPatternContext.none)
                    parseUnaryExpression(return, true, ConstantPatternContext.none)
                      parsePrimary(return, expression, ConstantPatternContext.none)
                        parseLiteralString(return)
                          parseSingleLiteralString(return)
                            listener: beginLiteralString("""
æbler
""")
                            listener: endLiteralString(0, })
                ensureSemicolon("""
æbler
""")
                  reportRecoverableError("""
æbler
""", Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}])
                    listener: handleRecoverableError(Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}], """
æbler
""", """
æbler
""")
                  rewriter()
                listener: endReturnStatement(true, return, ;)
                inGenerator()
          notEofOrType(CLOSE_CURLY_BRACKET, })
          listener: endBlockFunctionBody(1, {, })
        listener: endTopLevelMethod(void, null, })
  listener: endTopLevelDeclaration(})
  parseTopLevelDeclarationImpl(}, DirectiveContext(DirectiveState.Declarations))
    parseMetadataStar(})
      listener: beginMetadataStar(void)
      listener: endMetadataStar(0)
    parseTopLevelMemberImpl(})
      listener: beginTopLevelMember(void)
      parseTopLevelMethod(}, null, null, }, VoidType(), null, quux, false)
        listener: beginTopLevelMethod(}, null, null)
        listener: handleVoidKeyword(void)
        ensureIdentifierPotentiallyRecovered(void, topLevelFunctionDeclaration, false)
          listener: handleIdentifier(quux, topLevelFunctionDeclaration)
        parseMethodTypeVar(quux)
          listener: handleNoTypeVariables(()
        parseGetterOrFormalParameters(quux, quux, false, MemberKind.TopLevelMethod)
          parseFormalParameters(quux, 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, return)
          parseStatement({)
            parseStatementX({)
              parseReturnStatement({)
                listener: beginReturnStatement(return)
                parseExpression(return)
                  parsePrecedenceExpression(return, 1, true, ConstantPatternContext.none)
                    parseUnaryExpression(return, true, ConstantPatternContext.none)
                      parsePrimary(return, expression, ConstantPatternContext.none)
                        parseLiteralString(return)
                          parseSingleLiteralString(return)
                            listener: beginLiteralString("""æbler\""")
                            listener: endLiteralString(0, })
                ensureSemicolon("""æbler\""")
                  reportRecoverableError("""æbler\""", Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}])
                    listener: handleRecoverableError(Message[Template(ExpectedAfterButGot), Expected ';' after this., null, {string: ;}], """æbler\""", """æbler\""")
                  rewriter()
                listener: endReturnStatement(true, return, ;)
                inGenerator()
          notEofOrType(CLOSE_CURLY_BRACKET, })
          listener: endBlockFunctionBody(1, {, })
        listener: endTopLevelMethod(void, null, })
  listener: endTopLevelDeclaration(})
  reportAllErrorTokens(UnterminatedString("""))
    listener: handleErrorToken(UnterminatedString("""))
    listener: handleRecoverableError(Message[Template(UnterminatedString), String starting with """ must end with """., null, {string: """, string2: """}], UnterminatedString("""), UnterminatedString("""))
    listener: handleErrorToken(UnmatchedToken({))
    listener: handleRecoverableError(Message[Template(UnmatchedToken), Can't find '}' to match '{'., null, {string: }, lexeme: {}], UnmatchedToken({), UnmatchedToken({))
  listener: endCompilationUnit(5, )
