{ "type": "Script", "span": { "start": 15, "end": 284, "ctxt": 0 }, "body": [ { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 21, "end": 24, "ctxt": 0 }, "value": "Bar", "optional": false }, "declare": false, "span": { "start": 15, "end": 30, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassProperty", "span": { "start": 27, "end": 28, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 27, "end": 28, "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": 37, "end": 40, "ctxt": 0 }, "value": "Foo", "optional": false }, "declare": false, "span": { "start": 31, "end": 58, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassProperty", "span": { "start": 55, "end": 56, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 55, "end": 56, "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": 49, "end": 52, "ctxt": 0 }, "value": "Bar", "optional": false }, "isAbstract": false, "typeParams": null, "superTypeParams": null, "implements": [] }, { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 65, "end": 76, "ctxt": 0 }, "value": "FooIterator", "optional": false }, "declare": false, "span": { "start": 59, "end": 233, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassMethod", "span": { "start": 83, "end": 177, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 83, "end": 87, "ctxt": 0 }, "value": "next", "optional": false }, "function": { "params": [], "decorators": [], "span": { "start": 83, "end": 177, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 90, "end": 177, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 100, "end": 171, "ctxt": 0 }, "argument": { "type": "ObjectExpression", "span": { "start": 107, "end": 170, "ctxt": 0 }, "properties": [ { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 121, "end": 126, "ctxt": 0 }, "value": "value", "optional": false }, "value": { "type": "NewExpression", "span": { "start": 128, "end": 135, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 132, "end": 135, "ctxt": 0 }, "value": "Foo", "optional": false }, "arguments": null, "typeArguments": null } }, { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 149, "end": 153, "ctxt": 0 }, "value": "done", "optional": false }, "value": { "type": "BooleanLiteral", "span": { "start": 155, "end": 160, "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": 183, "end": 231, "ctxt": 0 }, "key": { "type": "Computed", "span": { "start": 183, "end": 200, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { "start": 184, "end": 199, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 184, "end": 190, "ctxt": 0 }, "value": "Symbol", "optional": false }, "property": { "type": "Identifier", "span": { "start": 191, "end": 199, "ctxt": 0 }, "value": "iterator", "optional": false } } }, "function": { "params": [], "decorators": [], "span": { "start": 183, "end": 231, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 203, "end": 231, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 213, "end": 225, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { "start": 220, "end": 224, "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": [] }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 244, "end": 247, "ctxt": 0 }, "value": "fun", "optional": false }, "declare": false, "params": [ { "type": "Parameter", "span": { "start": 248, "end": 257, "ctxt": 0 }, "decorators": [], "pat": { "type": "ArrayPattern", "span": { "start": 248, "end": 257, "ctxt": 0 }, "elements": [ { "type": "Identifier", "span": { "start": 249, "end": 250, "ctxt": 0 }, "value": "a", "optional": false, "typeAnnotation": null }, { "type": "RestElement", "span": { "start": 252, "end": 256, "ctxt": 0 }, "rest": { "start": 252, "end": 255, "ctxt": 0 }, "argument": { "type": "Identifier", "span": { "start": 255, "end": 256, "ctxt": 0 }, "value": "b", "optional": false, "typeAnnotation": null }, "typeAnnotation": null } ], "optional": false, "typeAnnotation": null } } ], "decorators": [], "span": { "start": 235, "end": 262, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 259, "end": 262, "ctxt": 0 }, "stmts": [] }, "generator": false, "async": false, "typeParameters": null, "returnType": null }, { "type": "ExpressionStatement", "span": { "start": 263, "end": 284, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { "start": 263, "end": 283, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 263, "end": 266, "ctxt": 0 }, "value": "fun", "optional": false }, "arguments": [ { "spread": null, "expression": { "type": "NewExpression", "span": { "start": 267, "end": 282, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 271, "end": 282, "ctxt": 0 }, "value": "FooIterator", "optional": false }, "arguments": null, "typeArguments": null } } ], "typeArguments": null } } ], "interpreter": null }