{ "type": "Script", "span": { "start": 15, "end": 276, "ctxt": 0 }, "body": [ { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 24, "end": 27, "ctxt": 0 }, "value": "fun", "optional": false }, "declare": false, "params": [ { "type": "Parameter", "span": { "start": 28, "end": 52, "ctxt": 0 }, "decorators": [], "pat": { "type": "AssignmentPattern", "span": { "start": 28, "end": 52, "ctxt": 0 }, "left": { "type": "ArrayPattern", "span": { "start": 28, "end": 34, "ctxt": 0 }, "elements": [ { "type": "Identifier", "span": { "start": 29, "end": 30, "ctxt": 0 }, "value": "a", "optional": false, "typeAnnotation": null }, { "type": "Identifier", "span": { "start": 32, "end": 33, "ctxt": 0 }, "value": "b", "optional": false, "typeAnnotation": null } ], "optional": false, "typeAnnotation": null }, "right": { "type": "NewExpression", "span": { "start": 37, "end": 52, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 41, "end": 52, "ctxt": 0 }, "value": "FooIterator", "optional": false }, "arguments": null, "typeArguments": null }, "typeAnnotation": null } } ], "decorators": [], "span": { "start": 15, "end": 57, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 54, "end": 57, "ctxt": 0 }, "stmts": [] }, "generator": false, "async": false, "typeParameters": null, "returnType": null }, { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 64, "end": 67, "ctxt": 0 }, "value": "Bar", "optional": false }, "declare": false, "span": { "start": 58, "end": 73, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassProperty", "span": { "start": 70, "end": 71, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 70, "end": 71, "ctxt": 0 }, "value": "x", "optional": false }, "value": null, "typeAnnotation": null, "isStatic": false, "decorators": [], "accessibility": null, "isAbstract": false, "isOptional": false, "isOverride": false, "readonly": false, "declare": false, "definite": false } ], "superClass": null, "isAbstract": false, "typeParams": null, "superTypeParams": null, "implements": [] }, { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 80, "end": 83, "ctxt": 0 }, "value": "Foo", "optional": false }, "declare": false, "span": { "start": 74, "end": 101, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassProperty", "span": { "start": 98, "end": 99, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 98, "end": 99, "ctxt": 0 }, "value": "y", "optional": false }, "value": null, "typeAnnotation": null, "isStatic": false, "decorators": [], "accessibility": null, "isAbstract": false, "isOptional": false, "isOverride": false, "readonly": false, "declare": false, "definite": false } ], "superClass": { "type": "Identifier", "span": { "start": 92, "end": 95, "ctxt": 0 }, "value": "Bar", "optional": false }, "isAbstract": false, "typeParams": null, "superTypeParams": null, "implements": [] }, { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 108, "end": 119, "ctxt": 0 }, "value": "FooIterator", "optional": false }, "declare": false, "span": { "start": 102, "end": 276, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassMethod", "span": { "start": 126, "end": 220, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 126, "end": 130, "ctxt": 0 }, "value": "next", "optional": false }, "function": { "params": [], "decorators": [], "span": { "start": 126, "end": 220, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 133, "end": 220, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 143, "end": 214, "ctxt": 0 }, "argument": { "type": "ObjectExpression", "span": { "start": 150, "end": 213, "ctxt": 0 }, "properties": [ { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 164, "end": 169, "ctxt": 0 }, "value": "value", "optional": false }, "value": { "type": "NewExpression", "span": { "start": 171, "end": 178, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 175, "end": 178, "ctxt": 0 }, "value": "Foo", "optional": false }, "arguments": null, "typeArguments": null } }, { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 192, "end": 196, "ctxt": 0 }, "value": "done", "optional": false }, "value": { "type": "BooleanLiteral", "span": { "start": 198, "end": 203, "ctxt": 0 }, "value": false } } ] } } ] }, "generator": false, "async": false, "typeParameters": null, "returnType": null }, "kind": "method", "isStatic": false, "accessibility": null, "isAbstract": false, "isOptional": false, "isOverride": false }, { "type": "ClassMethod", "span": { "start": 226, "end": 274, "ctxt": 0 }, "key": { "type": "Computed", "span": { "start": 226, "end": 243, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { "start": 227, "end": 242, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 227, "end": 233, "ctxt": 0 }, "value": "Symbol", "optional": false }, "property": { "type": "Identifier", "span": { "start": 234, "end": 242, "ctxt": 0 }, "value": "iterator", "optional": false } } }, "function": { "params": [], "decorators": [], "span": { "start": 226, "end": 274, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 246, "end": 274, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 256, "end": 268, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { "start": 263, "end": 267, "ctxt": 0 } } } ] }, "generator": false, "async": false, "typeParameters": null, "returnType": null }, "kind": "method", "isStatic": false, "accessibility": null, "isAbstract": false, "isOptional": false, "isOverride": false } ], "superClass": null, "isAbstract": false, "typeParams": null, "superTypeParams": null, "implements": [] } ], "interpreter": null }