UNPKG

@abaplint/runtime

Version:
74 lines 3.23 kB
"use strict"; 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 = require("./builtin"); const compare = require("./compare"); const DB = require("./db/db"); exports.DB = DB; const operators = require("./operators"); const RFC = require("./rfc"); exports.RFC = RFC; const types = 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"); class ABAP { constructor(input) { // global objects this.Classes = {}; this.Forms = {}; this.DDIC = {}; this.FunctionModules = {}; this.Interfaces = {}; this.MSAG = {}; this.OA2P = {}; this.SMIM = {}; this.TypePools = {}; this.W3MI = {}; this.internalIdCounter = 1; this.types = types; this.builtin = builtin; this.operators = operators; this.compare = compare; this.OffsetLength = offset_length_1.OffsetLength; this.templateFormatting = template_formatting_1.templateFormatting; this.expandIN = expand_in_1.expandIN; this.expandDynamic = expand_dynamic_1.expandDynamic; this.buildDbTableName = prefix_1.buildDbTableName; this.ClassicError = classic_error_1.ClassicError; this.dynamicCallLookup = dynamic_call_lookup_1.dynamicCallLookup; this.IntegerFactory = integer_factory_1.IntegerFactory; this.CharacterFactory = character_factory_1.CharacterFactory; 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