UNPKG

@abaplint/runtime

Version:
121 lines 4.96 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.ABAP = exports.MemoryConsole = exports.DB = exports.types = exports.RFC = void 0; const context_1 = require("./context"); const offset_length_1 = require("./offset_length"); const statements_1 = require("./statements"); const template_formatting_1 = require("./template_formatting"); const builtin = __importStar(require("./builtin")); const compare = __importStar(require("./compare")); const DB = __importStar(require("./db/db")); exports.DB = DB; const operators = __importStar(require("./operators")); const RFC = __importStar(require("./rfc")); exports.RFC = RFC; const types = __importStar(require("./types")); exports.types = types; const expand_in_1 = require("./expand_in"); const expand_dynamic_1 = require("./expand_dynamic"); const classic_error_1 = require("./classic_error"); const standard_out_console_1 = require("./console/standard_out_console"); const memory_console_1 = require("./console/memory_console"); Object.defineProperty(exports, "MemoryConsole", { enumerable: true, get: function () { return memory_console_1.MemoryConsole; } }); const prefix_1 = require("./prefix"); const integer_factory_1 = require("./integer_factory"); const dynamic_call_lookup_1 = require("./dynamic_call_lookup"); const character_factory_1 = require("./character_factory"); const abap_eventing_1 = require("./abap_eventing"); const is_line_not_found_1 = require("./is_line_not_found"); const parameters_call_1 = require("./parameters_call"); const alpha_1 = require("./alpha"); class ABAP { // global objects Classes = {}; Forms = {}; DDIC = {}; FunctionModules = {}; Interfaces = {}; MSAG = {}; OA2P = {}; SMIM = {}; TypePools = {}; W3MI = {}; internalIdCounter = 1; // stuff for runtime statements; types = types; builtin = builtin; operators = operators; compare = compare; console; OffsetLength = offset_length_1.OffsetLength; templateFormatting = template_formatting_1.templateFormatting; expandIN = expand_in_1.expandIN; expandDynamic = expand_dynamic_1.expandDynamic; isLineNotFound = is_line_not_found_1.isLineNotFound; buildDbTableName = prefix_1.buildDbTableName; ClassicError = classic_error_1.ClassicError; dynamicCallLookup = dynamic_call_lookup_1.dynamicCallLookup; parametersCall = parameters_call_1.parametersCall; eventing = new abap_eventing_1.ABAPEventing(); alphaOut = alpha_1.alphaOut; alphaIn = alpha_1.alphaIn; IntegerFactory = integer_factory_1.IntegerFactory; CharacterFactory = character_factory_1.CharacterFactory; context; dbo; constructor(input) { this.context = new context_1.Context(); this.console = input?.console ? input?.console : new standard_out_console_1.StandardOutConsole(); this.context.console = this.console; this.dbo = input?.database || { schemaPrefix: "", tablePrefix: "" }; if (this.dbo.schemaPrefix === undefined) { this.dbo.schemaPrefix = ""; } if (this.dbo.tablePrefix === undefined) { this.dbo.tablePrefix = ""; } this.statements = new statements_1.Statements(this.context); // todo, this should not be a singleton, it should be part of this instance // todo, move to context builtin.sy.get().subrc.set(0); builtin.sy.get().tabix.set(0); builtin.sy.get().index.set(0); this.statements.getTime({ sy: builtin.sy }); } } exports.ABAP = ABAP; //# sourceMappingURL=index.js.map