{ "type": "Program", "statements": [ { "type": "TSTypeAliasDeclaration", "id": { "type": "Identifier", "name": "func_type", "decorators": [], "loc": { "start": { "line": 16, "column": 6, "program": "functionPointerArray.ets" }, "end": { "line": 16, "column": 15, "program": "functionPointerArray.ets" } } }, "typeAnnotation": { "type": "ETSFunctionType", "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 16, "column": 24, "program": "functionPointerArray.ets" }, "end": { "line": 16, "column": 28, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 16, "column": 18, "program": "functionPointerArray.ets" }, "end": { "line": 16, "column": 28, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 16, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 16, "column": 29, "program": "functionPointerArray.ets" } } }, { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "ETSGLOBAL", "decorators": [], "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 1, "program": "functionPointerArray.ets" } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1, "program": null }, "end": { "line": 1, "column": 1, "program": null } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1, "program": null }, "end": { "line": 1, "column": 1, "program": null } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 1, "column": 1, "program": null }, "end": { "line": 1, "column": 1, "program": null } } }, "loc": { "start": { "line": 1, "column": 1, "program": null }, "end": { "line": 1, "column": 1, "program": null } } }, "loc": { "start": { "line": 1, "column": 1, "program": null }, "end": { "line": 1, "column": 1, "program": null } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 1, "program": "functionPointerArray.ets" } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 18, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 18, "column": 13, "program": "functionPointerArray.ets" } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 18, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 18, "column": 13, "program": "functionPointerArray.ets" } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 18, "column": 18, "program": "functionPointerArray.ets" }, "end": { "line": 18, "column": 22, "program": "functionPointerArray.ets" } } }, "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 18, "column": 23, "program": "functionPointerArray.ets" }, "end": { "line": 18, "column": 25, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 18, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 18, "column": 25, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 18, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 18, "column": 25, "program": "functionPointerArray.ets" } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 18, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 18, "column": 25, "program": "functionPointerArray.ets" } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "CreateArray", "decorators": [], "loc": { "start": { "line": 20, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 21, "program": "functionPointerArray.ets" } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "CreateArray", "decorators": [], "loc": { "start": { "line": 20, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 21, "program": "functionPointerArray.ets" } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "func_type", "decorators": [], "loc": { "start": { "line": 20, "column": 25, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 34, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 20, "column": 25, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 35, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 20, "column": 25, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 35, "program": "functionPointerArray.ets" } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 22, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 35, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 20, "column": 22, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 35, "program": "functionPointerArray.ets" } } } ], "returnType": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Array", "decorators": [], "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "func_type", "decorators": [], "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 20, "column": 46, "program": "functionPointerArray.ets" }, "end": { "line": 20, "column": 48, "program": "functionPointerArray.ets" } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "ArrayExpression", "elements": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 21, "column": 13, "program": "functionPointerArray.ets" }, "end": { "line": 21, "column": 14, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 21, "column": 12, "program": "functionPointerArray.ets" }, "end": { "line": 21, "column": 15, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 21, "column": 5, "program": "functionPointerArray.ets" }, "end": { "line": 21, "column": 15, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 20, "column": 49, "program": "functionPointerArray.ets" }, "end": { "line": 22, "column": 2, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 20, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 22, "column": 2, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 20, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 22, "column": 2, "program": "functionPointerArray.ets" } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 20, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 22, "column": 2, "program": "functionPointerArray.ets" } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 24, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 24, "column": 14, "program": "functionPointerArray.ets" } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 24, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 24, "column": 14, "program": "functionPointerArray.ets" } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 24, "column": 18, "program": "functionPointerArray.ets" }, "end": { "line": 24, "column": 22, "program": "functionPointerArray.ets" } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "arr", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Array", "decorators": [], "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "func_type", "decorators": [], "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 25, "column": 21, "program": "functionPointerArray.ets" }, "end": { "line": 25, "column": 23, "program": "functionPointerArray.ets" } } }, "decorators": [], "loc": { "start": { "line": 25, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 25, "column": 10, "program": "functionPointerArray.ets" } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 25, "column": 27, "program": "functionPointerArray.ets" }, "end": { "line": 25, "column": 30, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 25, "column": 26, "program": "functionPointerArray.ets" }, "end": { "line": 25, "column": 31, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 25, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 25, "column": 31, "program": "functionPointerArray.ets" } } } ], "kind": "let", "loc": { "start": { "line": 25, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 25, "column": 32, "program": "functionPointerArray.ets" } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "func_type", "decorators": [], "loc": { "start": { "line": 27, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 27, "column": 19, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 27, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 27, "column": 21, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 27, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 27, "column": 21, "program": "functionPointerArray.ets" } } }, "decorators": [], "loc": { "start": { "line": 27, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 27, "column": 8, "program": "functionPointerArray.ets" } } }, "init": { "type": "Identifier", "name": "foo", "decorators": [], "loc": { "start": { "line": 27, "column": 22, "program": "functionPointerArray.ets" }, "end": { "line": 27, "column": 25, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 27, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 27, "column": 25, "program": "functionPointerArray.ets" } } } ], "kind": "let", "loc": { "start": { "line": 27, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 27, "column": 25, "program": "functionPointerArray.ets" } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "array", "typeAnnotation": { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "Array", "decorators": [], "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "typeParams": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "ETSTypeReference", "part": { "type": "ETSTypeReferencePart", "name": { "type": "Identifier", "name": "func_type", "decorators": [], "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 1, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 3, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 28, "column": 23, "program": "functionPointerArray.ets" }, "end": { "line": 28, "column": 25, "program": "functionPointerArray.ets" } } }, "decorators": [], "loc": { "start": { "line": 28, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 28, "column": 12, "program": "functionPointerArray.ets" } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 28, "column": 29, "program": "functionPointerArray.ets" }, "end": { "line": 28, "column": 30, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 28, "column": 28, "program": "functionPointerArray.ets" }, "end": { "line": 28, "column": 31, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 28, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 28, "column": 31, "program": "functionPointerArray.ets" } } } ], "kind": "let", "loc": { "start": { "line": 28, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 28, "column": 31, "program": "functionPointerArray.ets" } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "array_too", "decorators": [], "loc": { "start": { "line": 30, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 30, "column": 16, "program": "functionPointerArray.ets" } } }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "CreateArray", "decorators": [], "loc": { "start": { "line": 30, "column": 19, "program": "functionPointerArray.ets" }, "end": { "line": 30, "column": 30, "program": "functionPointerArray.ets" } } }, "arguments": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 30, "column": 31, "program": "functionPointerArray.ets" }, "end": { "line": 30, "column": 32, "program": "functionPointerArray.ets" } } } ], "optional": false, "loc": { "start": { "line": 30, "column": 19, "program": "functionPointerArray.ets" }, "end": { "line": 30, "column": 33, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 30, "column": 7, "program": "functionPointerArray.ets" }, "end": { "line": 30, "column": 33, "program": "functionPointerArray.ets" } } } ], "kind": "let", "loc": { "start": { "line": 30, "column": 3, "program": "functionPointerArray.ets" }, "end": { "line": 30, "column": 33, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 24, "column": 23, "program": "functionPointerArray.ets" }, "end": { "line": 31, "column": 2, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 24, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 31, "column": 2, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 24, "column": 10, "program": "functionPointerArray.ets" }, "end": { "line": 31, "column": 2, "program": "functionPointerArray.ets" } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 24, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 31, "column": 2, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 1, "program": "functionPointerArray.ets" } } }, "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 1, "column": 1, "program": "functionPointerArray.ets" } } } ], "loc": { "start": { "line": 1, "column": 1, "program": "functionPointerArray.ets" }, "end": { "line": 32, "column": 1, "program": "functionPointerArray.ets" } } }