{ "type": "Program", "statements": [ { "type": "ClassDeclaration", "definition": { "id": { "type": "Identifier", "name": "ETSGLOBAL", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "superClass": null, "implements": [], "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "_$init$_", "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "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 }, "end": { "line": 1, "column": 1 } } }, "generator": false, "async": false, "expression": false, "params": [], "body": { "type": "BlockStatement", "statements": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "is_active", "decorators": [], "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16, "column": 19 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "is_active", "decorators": [], "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16, "column": 19 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "fn", "typeAnnotation": { "type": "ETSFunctionType", "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 16, "column": 33 } } }, "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 33 } } }, "decorators": [], "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 33 } } }, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 33 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 39 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "fn", "decorators": [], "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 14 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 17, "column": 16 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 16 } } } ], "loc": { "start": { "line": 16, "column": 40 }, "end": { "line": 18, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 18, "column": 2 } } }, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 18, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 16, "column": 1 }, "end": { "line": 18, "column": 2 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "with_param", "decorators": [], "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 20 } } }, "kind": "method", "accessibility": "public", "static": true, "optional": false, "computed": false, "value": { "type": "FunctionExpression", "function": { "type": "ScriptFunction", "id": { "type": "Identifier", "name": "with_param", "decorators": [], "loc": { "start": { "line": 20, "column": 10 }, "end": { "line": 20, "column": 20 } } }, "generator": false, "async": false, "expression": false, "params": [ { "type": "ETSParameterExpression", "name": { "type": "Identifier", "name": "fn", "typeAnnotation": { "type": "ETSFunctionType", "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 20, "column": 31 }, "end": { "line": 20, "column": 34 } } }, "loc": { "start": { "line": 20, "column": 25 }, "end": { "line": 20, "column": 34 } } }, "decorators": [], "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 34 } } }, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 34 } } } ], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 20, "column": 37 }, "end": { "line": 20, "column": 41 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "fn", "decorators": [], "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 7 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 9 } } }, "loc": { "start": { "line": 21, "column": 5 }, "end": { "line": 21, "column": 9 } } } ], "loc": { "start": { "line": 20, "column": 42 }, "end": { "line": 22, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 22, "column": 2 } } }, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 22, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 20, "column": 1 }, "end": { "line": 22, "column": 2 } } }, { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "main", "decorators": [], "loc": { "start": { "line": 24, "column": 10 }, "end": { "line": 24, "column": 14 } } }, "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 }, "end": { "line": 24, "column": 14 } } }, "generator": false, "async": false, "expression": false, "params": [], "returnType": { "type": "ETSPrimitiveType", "loc": { "start": { "line": 24, "column": 18 }, "end": { "line": 24, "column": 22 } } }, "body": { "type": "BlockStatement", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "switch_arg", "decorators": [], "loc": { "start": { "line": 25, "column": 11 }, "end": { "line": 25, "column": 21 } } }, "init": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 25, "column": 24 }, "end": { "line": 25, "column": 25 } } }, "loc": { "start": { "line": 25, "column": 11 }, "end": { "line": 25, "column": 25 } } } ], "kind": "const", "loc": { "start": { "line": 25, "column": 5 }, "end": { "line": 25, "column": 25 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "with_param", "decorators": [], "loc": { "start": { "line": 26, "column": 5 }, "end": { "line": 26, "column": 15 } } }, "arguments": [], "optional": false, "loc": { "start": { "line": 26, "column": 5 }, "end": { "line": 26, "column": 17 } } }, "loc": { "start": { "line": 26, "column": 5 }, "end": { "line": 26, "column": 17 } } } ], "loc": { "start": { "line": 24, "column": 23 }, "end": { "line": 35, "column": 2 } } }, "loc": { "start": { "line": 24, "column": 14 }, "end": { "line": 35, "column": 2 } } }, "loc": { "start": { "line": 24, "column": 14 }, "end": { "line": 35, "column": 2 } } }, "overloads": [], "decorators": [], "loc": { "start": { "line": 24, "column": 1 }, "end": { "line": 35, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 36, "column": 1 } } }