beginCompilationUnit(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({)
        beginMetadataStar(int)
        endMetadataStar(0)
        handleIdentifier(int, typeReference)
        handleNoTypeArguments(i)
        handleType(int, null)
        beginVariablesDeclaration(i, null, null)
          handleIdentifier(i, localVariableDeclaration)
          beginInitializedIdentifier(i)
            handleNoVariableInitializer(i)
          endInitializedIdentifier(i)
        endVariablesDeclaration(1, ;)
        beginForStatement(for)
          handleIdentifier(i, expression)
          handleNoTypeArguments(=)
          handleNoArguments(=)
          handleSend(i, =)
          handleLiteralInt(0)
          handleAssignmentExpression(=)
          handleForInitializerExpressionStatement(0, false)
          handleIdentifier(i, expression)
          handleNoTypeArguments(<)
          handleNoArguments(<)
          handleSend(i, <)
          beginBinaryExpression(<)
            handleLiteralInt(10)
          endBinaryExpression(<)
          handleExpressionStatement(;)
          handleIdentifier(i, expression)
          handleNoTypeArguments(++)
          handleNoArguments(++)
          handleSend(i, ++)
          handleUnaryPostfixAssignmentExpression(++)
          handleForLoopParts(for, (, ;, 1)
          beginForStatementBody({)
            beginBlock({, BlockKind(statement))
            endBlock(0, {, }, BlockKind(statement))
          endForStatementBody(})
        endForStatement(})
      endBlockFunctionBody(2, {, })
    endTopLevelMethod(main, null, })
  endTopLevelDeclaration()
endCompilationUnit(1, )
