@abaplint/runtime 2.10.83 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/abap_eventing.d.ts +12 -0
- package/build/src/abap_eventing.js +48 -0
- package/build/src/character_factory.js +1 -1
- package/build/src/classic_error.js +1 -0
- package/build/src/console/memory_console.js +1 -3
- package/build/src/console/standard_out_console.js +1 -3
- package/build/src/context.js +6 -7
- package/build/src/index.d.ts +2 -0
- package/build/src/index.js +32 -25
- package/build/src/integer_factory.js +1 -1
- package/build/src/offset_length.js +4 -0
- package/build/src/statements/call_function.js +1 -0
- package/build/src/statements/index.js +40 -39
- package/build/src/statements/message.js +1 -0
- package/build/src/statements/raise_event.d.ts +3 -1
- package/build/src/statements/raise_event.js +2 -3
- package/build/src/statements/set_handler.d.ts +2 -1
- package/build/src/statements/set_handler.js +14 -3
- package/build/src/statements/write.js +1 -0
- package/build/src/trace.js +1 -3
- package/build/src/types/abap_object.js +3 -0
- package/build/src/types/character.js +4 -1
- package/build/src/types/data_reference.js +2 -0
- package/build/src/types/date.js +2 -0
- package/build/src/types/decfloat34.js +1 -0
- package/build/src/types/field_symbol.js +3 -0
- package/build/src/types/float.js +2 -0
- package/build/src/types/hex.js +3 -0
- package/build/src/types/hex_uint8.js +3 -0
- package/build/src/types/integer.js +3 -1
- package/build/src/types/integer8.js +2 -0
- package/build/src/types/numc.js +3 -0
- package/build/src/types/packed.js +5 -0
- package/build/src/types/string.js +2 -0
- package/build/src/types/structure.js +5 -0
- package/build/src/types/table.js +19 -0
- package/build/src/types/time.js +2 -0
- package/build/src/types/utc_long.js +2 -0
- package/build/src/types/xstring.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ABAPObject } from "./types";
|
|
2
|
+
export type ABAPEventReference = {
|
|
3
|
+
EVENT_NAME: string;
|
|
4
|
+
EVENT_CLASS: string;
|
|
5
|
+
};
|
|
6
|
+
type HandlerMethod = (parameters?: any) => Promise<void>;
|
|
7
|
+
export declare class ABAPEventing {
|
|
8
|
+
private readonly registrations;
|
|
9
|
+
setHandler(event: ABAPEventReference, methods: HandlerMethod[], forObject: ABAPObject | "ALL", activation: boolean): any;
|
|
10
|
+
raiseEvent(event: ABAPEventReference, me: ABAPObject, _parameters?: object): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ABAPEventing = void 0;
|
|
4
|
+
class ABAPEventing {
|
|
5
|
+
registrations = {};
|
|
6
|
+
setHandler(event, methods, forObject, activation) {
|
|
7
|
+
if (activation === false) {
|
|
8
|
+
throw new Error("ABAPEventing.setHandler: deactivation not supported, todo");
|
|
9
|
+
}
|
|
10
|
+
else if (methods.length === 0) {
|
|
11
|
+
throw new Error("ABAPEventing.setHandler: no methods provided");
|
|
12
|
+
}
|
|
13
|
+
if (!this.registrations[event.EVENT_CLASS]) {
|
|
14
|
+
this.registrations[event.EVENT_CLASS] = {};
|
|
15
|
+
}
|
|
16
|
+
if (!this.registrations[event.EVENT_CLASS][event.EVENT_NAME]) {
|
|
17
|
+
this.registrations[event.EVENT_CLASS][event.EVENT_NAME] = [];
|
|
18
|
+
}
|
|
19
|
+
const ref = forObject === "ALL" ? "ALL" : new WeakRef(forObject);
|
|
20
|
+
const handlers = this.registrations[event.EVENT_CLASS][event.EVENT_NAME];
|
|
21
|
+
// todo: tackle duplicates
|
|
22
|
+
handlers.push({
|
|
23
|
+
handlers: methods,
|
|
24
|
+
forObject: ref,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
// todo: cleanup of dead WeakRefs
|
|
28
|
+
async raiseEvent(event, me, _parameters) {
|
|
29
|
+
const handlers = this.registrations[event.EVENT_CLASS]?.[event.EVENT_NAME];
|
|
30
|
+
if (handlers === undefined) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
for (const handler of handlers) {
|
|
34
|
+
if (handler.forObject === "ALL") {
|
|
35
|
+
for (const method of handler.handlers) {
|
|
36
|
+
await method(_parameters);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else if (handler.forObject.deref() === me) {
|
|
40
|
+
for (const method of handler.handlers) {
|
|
41
|
+
await method(_parameters);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.ABAPEventing = ABAPEventing;
|
|
48
|
+
//# sourceMappingURL=abap_eventing.js.map
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CharacterFactory = void 0;
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
class CharacterFactory {
|
|
6
|
+
static map = {};
|
|
6
7
|
static get(length, value) {
|
|
7
8
|
if (CharacterFactory.map[value] === undefined) {
|
|
8
9
|
CharacterFactory.map[value] = new types_1.Character(length).set(value).setConstant();
|
|
@@ -11,5 +12,4 @@ class CharacterFactory {
|
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
exports.CharacterFactory = CharacterFactory;
|
|
14
|
-
CharacterFactory.map = {};
|
|
15
15
|
//# sourceMappingURL=character_factory.js.map
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StandardOutConsole = void 0;
|
|
4
4
|
class StandardOutConsole {
|
|
5
|
-
|
|
6
|
-
this.empty = true;
|
|
7
|
-
}
|
|
5
|
+
empty = true;
|
|
8
6
|
clear() {
|
|
9
7
|
throw new Error("transpiler runtime: not supported for stdio console");
|
|
10
8
|
}
|
package/build/src/context.js
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Context = void 0;
|
|
4
4
|
class Context {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
5
|
+
console;
|
|
6
|
+
cursorCounter = 0;
|
|
7
|
+
cursors = {};
|
|
8
|
+
// DEFAULT and secondary database connections
|
|
9
|
+
databaseConnections = {};
|
|
10
|
+
RFCDestinations = {};
|
|
12
11
|
defaultDB() {
|
|
13
12
|
if (this.databaseConnections["DEFAULT"] === undefined) {
|
|
14
13
|
throw new Error("Runtime, database not initialized");
|
package/build/src/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { buildDbTableName } from "./prefix";
|
|
|
17
17
|
import { IntegerFactory } from "./integer_factory";
|
|
18
18
|
import { dynamicCallLookup } from "./dynamic_call_lookup";
|
|
19
19
|
import { CharacterFactory } from "./character_factory";
|
|
20
|
+
import { ABAPEventing } from "./abap_eventing";
|
|
20
21
|
export { RFC, types, DB, MemoryConsole };
|
|
21
22
|
export type RuntimeDatabaseOptions = {
|
|
22
23
|
schemaPrefix?: string;
|
|
@@ -71,6 +72,7 @@ export declare class ABAP {
|
|
|
71
72
|
buildDbTableName: typeof buildDbTableName;
|
|
72
73
|
ClassicError: typeof ClassicError;
|
|
73
74
|
dynamicCallLookup: typeof dynamicCallLookup;
|
|
75
|
+
eventing: ABAPEventing;
|
|
74
76
|
IntegerFactory: typeof IntegerFactory;
|
|
75
77
|
CharacterFactory: typeof CharacterFactory;
|
|
76
78
|
readonly context: Context;
|
package/build/src/index.js
CHANGED
|
@@ -24,33 +24,40 @@ const prefix_1 = require("./prefix");
|
|
|
24
24
|
const integer_factory_1 = require("./integer_factory");
|
|
25
25
|
const dynamic_call_lookup_1 = require("./dynamic_call_lookup");
|
|
26
26
|
const character_factory_1 = require("./character_factory");
|
|
27
|
+
const abap_eventing_1 = require("./abap_eventing");
|
|
27
28
|
class ABAP {
|
|
29
|
+
// global objects
|
|
30
|
+
Classes = {};
|
|
31
|
+
Forms = {};
|
|
32
|
+
DDIC = {};
|
|
33
|
+
FunctionModules = {};
|
|
34
|
+
Interfaces = {};
|
|
35
|
+
MSAG = {};
|
|
36
|
+
OA2P = {};
|
|
37
|
+
SMIM = {};
|
|
38
|
+
TypePools = {};
|
|
39
|
+
W3MI = {};
|
|
40
|
+
internalIdCounter = 1;
|
|
41
|
+
// stuff for runtime
|
|
42
|
+
statements;
|
|
43
|
+
types = types;
|
|
44
|
+
builtin = builtin;
|
|
45
|
+
operators = operators;
|
|
46
|
+
compare = compare;
|
|
47
|
+
console;
|
|
48
|
+
OffsetLength = offset_length_1.OffsetLength;
|
|
49
|
+
templateFormatting = template_formatting_1.templateFormatting;
|
|
50
|
+
expandIN = expand_in_1.expandIN;
|
|
51
|
+
expandDynamic = expand_dynamic_1.expandDynamic;
|
|
52
|
+
buildDbTableName = prefix_1.buildDbTableName;
|
|
53
|
+
ClassicError = classic_error_1.ClassicError;
|
|
54
|
+
dynamicCallLookup = dynamic_call_lookup_1.dynamicCallLookup;
|
|
55
|
+
eventing = new abap_eventing_1.ABAPEventing();
|
|
56
|
+
IntegerFactory = integer_factory_1.IntegerFactory;
|
|
57
|
+
CharacterFactory = character_factory_1.CharacterFactory;
|
|
58
|
+
context;
|
|
59
|
+
dbo;
|
|
28
60
|
constructor(input) {
|
|
29
|
-
// global objects
|
|
30
|
-
this.Classes = {};
|
|
31
|
-
this.Forms = {};
|
|
32
|
-
this.DDIC = {};
|
|
33
|
-
this.FunctionModules = {};
|
|
34
|
-
this.Interfaces = {};
|
|
35
|
-
this.MSAG = {};
|
|
36
|
-
this.OA2P = {};
|
|
37
|
-
this.SMIM = {};
|
|
38
|
-
this.TypePools = {};
|
|
39
|
-
this.W3MI = {};
|
|
40
|
-
this.internalIdCounter = 1;
|
|
41
|
-
this.types = types;
|
|
42
|
-
this.builtin = builtin;
|
|
43
|
-
this.operators = operators;
|
|
44
|
-
this.compare = compare;
|
|
45
|
-
this.OffsetLength = offset_length_1.OffsetLength;
|
|
46
|
-
this.templateFormatting = template_formatting_1.templateFormatting;
|
|
47
|
-
this.expandIN = expand_in_1.expandIN;
|
|
48
|
-
this.expandDynamic = expand_dynamic_1.expandDynamic;
|
|
49
|
-
this.buildDbTableName = prefix_1.buildDbTableName;
|
|
50
|
-
this.ClassicError = classic_error_1.ClassicError;
|
|
51
|
-
this.dynamicCallLookup = dynamic_call_lookup_1.dynamicCallLookup;
|
|
52
|
-
this.IntegerFactory = integer_factory_1.IntegerFactory;
|
|
53
|
-
this.CharacterFactory = character_factory_1.CharacterFactory;
|
|
54
61
|
this.context = new context_1.Context();
|
|
55
62
|
this.console = input?.console ? input?.console : new standard_out_console_1.StandardOutConsole();
|
|
56
63
|
this.context.console = this.console;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IntegerFactory = void 0;
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
class IntegerFactory {
|
|
6
|
+
static map = {};
|
|
6
7
|
static get(value) {
|
|
7
8
|
if (IntegerFactory.map[value] === undefined) {
|
|
8
9
|
IntegerFactory.map[value] = new types_1.Integer().set(value).setConstant();
|
|
@@ -11,5 +12,4 @@ class IntegerFactory {
|
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
exports.IntegerFactory = IntegerFactory;
|
|
14
|
-
IntegerFactory.map = {};
|
|
15
15
|
//# sourceMappingURL=integer_factory.js.map
|
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OffsetLength = void 0;
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
class OffsetLength {
|
|
6
|
+
obj;
|
|
7
|
+
offset;
|
|
8
|
+
length;
|
|
9
|
+
isHex;
|
|
6
10
|
constructor(obj, options) {
|
|
7
11
|
this.obj = obj;
|
|
8
12
|
if (this.obj instanceof types_1.FieldSymbol) {
|
|
@@ -55,46 +55,47 @@ const trace_1 = require("../trace");
|
|
|
55
55
|
// this is a class, as statements like SELECT needs access to the database object instance
|
|
56
56
|
// and WRITE will access the Console
|
|
57
57
|
class Statements {
|
|
58
|
+
append = append_1.append;
|
|
59
|
+
assert = assert_1.assert;
|
|
60
|
+
assign = assign_1.assign;
|
|
61
|
+
cast = cast_1.cast;
|
|
62
|
+
collect = collect_1.collect;
|
|
63
|
+
commit = commit_1.commit;
|
|
64
|
+
concatenate = concatenate_1.concatenate;
|
|
65
|
+
condense = condense_1.condense;
|
|
66
|
+
convert = convert_1.convert;
|
|
67
|
+
createData = create_data_1.createData;
|
|
68
|
+
deleteInternal = delete_internal_1.deleteInternal;
|
|
69
|
+
describe = describe_1.describe;
|
|
70
|
+
find = find_1.find;
|
|
71
|
+
unpack = unpack_1.unpack;
|
|
72
|
+
getBit = get_bit_1.getBit;
|
|
73
|
+
readReport = read_report_1.readReport;
|
|
74
|
+
getLocale = get_locale_1.getLocale;
|
|
75
|
+
getParameter = get_parameter_1.getParameter;
|
|
76
|
+
getRunTime = get_run_time_1.getRunTime;
|
|
77
|
+
getTime = get_time_1.getTime;
|
|
78
|
+
insertInternal = insert_internal_1.insertInternal;
|
|
79
|
+
loop = loop_1.loop;
|
|
80
|
+
modifyInternal = modify_internal_1.modifyInternal;
|
|
81
|
+
moveCorresponding = move_corresponding_1.moveCorresponding;
|
|
82
|
+
overlay = overlay_1.overlay;
|
|
83
|
+
raiseEvent = raise_event_1.raiseEvent;
|
|
84
|
+
readTable = read_table_1.readTable;
|
|
85
|
+
replace = replace_1.replace;
|
|
86
|
+
rollback = rollback_1.rollback;
|
|
87
|
+
setBit = set_bit_1.setBit;
|
|
88
|
+
setHandler = set_handler_1.setHandler;
|
|
89
|
+
setLocale = set_locale_1.setLocale;
|
|
90
|
+
shift = shift_1.shift;
|
|
91
|
+
sort = sort_1.sort;
|
|
92
|
+
split = split_1.split;
|
|
93
|
+
translate = translate_1.translate;
|
|
94
|
+
wait = wait_1.wait;
|
|
95
|
+
receive = receive_1.receive;
|
|
96
|
+
callTransaction = call_transaction_1.callTransaction;
|
|
97
|
+
context;
|
|
58
98
|
constructor(context) {
|
|
59
|
-
this.append = append_1.append;
|
|
60
|
-
this.assert = assert_1.assert;
|
|
61
|
-
this.assign = assign_1.assign;
|
|
62
|
-
this.cast = cast_1.cast;
|
|
63
|
-
this.collect = collect_1.collect;
|
|
64
|
-
this.commit = commit_1.commit;
|
|
65
|
-
this.concatenate = concatenate_1.concatenate;
|
|
66
|
-
this.condense = condense_1.condense;
|
|
67
|
-
this.convert = convert_1.convert;
|
|
68
|
-
this.createData = create_data_1.createData;
|
|
69
|
-
this.deleteInternal = delete_internal_1.deleteInternal;
|
|
70
|
-
this.describe = describe_1.describe;
|
|
71
|
-
this.find = find_1.find;
|
|
72
|
-
this.unpack = unpack_1.unpack;
|
|
73
|
-
this.getBit = get_bit_1.getBit;
|
|
74
|
-
this.readReport = read_report_1.readReport;
|
|
75
|
-
this.getLocale = get_locale_1.getLocale;
|
|
76
|
-
this.getParameter = get_parameter_1.getParameter;
|
|
77
|
-
this.getRunTime = get_run_time_1.getRunTime;
|
|
78
|
-
this.getTime = get_time_1.getTime;
|
|
79
|
-
this.insertInternal = insert_internal_1.insertInternal;
|
|
80
|
-
this.loop = loop_1.loop;
|
|
81
|
-
this.modifyInternal = modify_internal_1.modifyInternal;
|
|
82
|
-
this.moveCorresponding = move_corresponding_1.moveCorresponding;
|
|
83
|
-
this.overlay = overlay_1.overlay;
|
|
84
|
-
this.raiseEvent = raise_event_1.raiseEvent;
|
|
85
|
-
this.readTable = read_table_1.readTable;
|
|
86
|
-
this.replace = replace_1.replace;
|
|
87
|
-
this.rollback = rollback_1.rollback;
|
|
88
|
-
this.setBit = set_bit_1.setBit;
|
|
89
|
-
this.setHandler = set_handler_1.setHandler;
|
|
90
|
-
this.setLocale = set_locale_1.setLocale;
|
|
91
|
-
this.shift = shift_1.shift;
|
|
92
|
-
this.sort = sort_1.sort;
|
|
93
|
-
this.split = split_1.split;
|
|
94
|
-
this.translate = translate_1.translate;
|
|
95
|
-
this.wait = wait_1.wait;
|
|
96
|
-
this.receive = receive_1.receive;
|
|
97
|
-
this.callTransaction = call_transaction_1.callTransaction;
|
|
98
99
|
this.context = context;
|
|
99
100
|
}
|
|
100
101
|
_setTrace(min = 10, totals = false) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.raiseEvent = raiseEvent;
|
|
4
|
-
function raiseEvent() {
|
|
5
|
-
|
|
6
|
-
return;
|
|
4
|
+
async function raiseEvent(eventReference, me, parameters) {
|
|
5
|
+
await abap.eventing.raiseEvent(eventReference, me, parameters);
|
|
7
6
|
}
|
|
8
7
|
//# sourceMappingURL=raise_event.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ABAPEventReference } from "../abap_eventing";
|
|
1
2
|
import { ABAPObject, FieldSymbol } from "../types";
|
|
2
3
|
import { ICharacter } from "../types/_character";
|
|
3
|
-
export declare function setHandler(
|
|
4
|
+
export declare function setHandler(eventReference: ABAPEventReference, methods: any[], forObject: ABAPObject | FieldSymbol, activation?: ICharacter): void;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setHandler = setHandler;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
function setHandler(eventReference, methods, forObject, activation) {
|
|
6
|
+
if (forObject instanceof types_1.FieldSymbol) {
|
|
7
|
+
const pointer = forObject.getPointer();
|
|
8
|
+
if (pointer === undefined) {
|
|
9
|
+
throw new Error("CX_SY_ SOMETHING TODO");
|
|
10
|
+
}
|
|
11
|
+
return setHandler(eventReference, methods, pointer, activation);
|
|
12
|
+
}
|
|
13
|
+
else if (forObject instanceof types_1.ABAPObject && forObject.get() === undefined) {
|
|
14
|
+
throw new Error("SET_HANDLER_FOR_NULL");
|
|
15
|
+
}
|
|
16
|
+
const act = activation === undefined ? true : activation.get() === "X";
|
|
17
|
+
abap.eventing.setHandler(eventReference, methods, forObject, act);
|
|
7
18
|
}
|
|
8
19
|
//# sourceMappingURL=set_handler.js.map
|
package/build/src/trace.js
CHANGED
|
@@ -4,9 +4,7 @@ exports.Trace = void 0;
|
|
|
4
4
|
const types_1 = require("util/types");
|
|
5
5
|
const statements_1 = require("./statements");
|
|
6
6
|
class Trace {
|
|
7
|
-
|
|
8
|
-
this.traceTotals = {};
|
|
9
|
-
}
|
|
7
|
+
traceTotals = {};
|
|
10
8
|
setTrace(min, totals, statements) {
|
|
11
9
|
const candidates = [...Object.keys(statements), ...Object.getOwnPropertyNames(statements_1.Statements.prototype)];
|
|
12
10
|
for (const c of candidates) {
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ABAPObject = void 0;
|
|
4
4
|
const field_symbol_1 = require("./field_symbol");
|
|
5
5
|
class ABAPObject {
|
|
6
|
+
value;
|
|
7
|
+
qualifiedName;
|
|
8
|
+
RTTIName;
|
|
6
9
|
constructor(input) {
|
|
7
10
|
this.qualifiedName = input?.qualifiedName;
|
|
8
11
|
this.RTTIName = input?.RTTIName;
|
|
@@ -9,8 +9,11 @@ const integer_1 = require("./integer");
|
|
|
9
9
|
const TRIMREGEX = / *$/;
|
|
10
10
|
const initialValues = {};
|
|
11
11
|
class Character {
|
|
12
|
+
value;
|
|
13
|
+
constant = false;
|
|
14
|
+
length;
|
|
15
|
+
extra;
|
|
12
16
|
constructor(length, extra) {
|
|
13
|
-
this.constant = false;
|
|
14
17
|
this.length = length || 1;
|
|
15
18
|
if (typeof this.length === "object") {
|
|
16
19
|
throw "Character, invalid length, object: " + JSON.stringify(this.length);
|
package/build/src/types/date.js
CHANGED
|
@@ -6,6 +6,8 @@ const _date_helper_1 = require("./_date_helper");
|
|
|
6
6
|
const float_1 = require("./float");
|
|
7
7
|
const _parse_1 = require("../operators/_parse");
|
|
8
8
|
class Date {
|
|
9
|
+
value;
|
|
10
|
+
qualifiedName;
|
|
9
11
|
constructor(input) {
|
|
10
12
|
this.clear();
|
|
11
13
|
this.qualifiedName = input?.qualifiedName;
|
|
@@ -8,6 +8,9 @@ const float_1 = require("./float");
|
|
|
8
8
|
const data_reference_1 = require("./data_reference");
|
|
9
9
|
const hex_uint8_1 = require("./hex_uint8");
|
|
10
10
|
class FieldSymbol {
|
|
11
|
+
pointer;
|
|
12
|
+
casting;
|
|
13
|
+
type;
|
|
11
14
|
constructor(type) {
|
|
12
15
|
this.pointer = undefined;
|
|
13
16
|
this.casting = false;
|
package/build/src/types/float.js
CHANGED
package/build/src/types/hex.js
CHANGED
|
@@ -8,6 +8,9 @@ const throw_error_1 = require("../throw_error");
|
|
|
8
8
|
const integer8_1 = require("./integer8");
|
|
9
9
|
const REGEXP = /^(?![A-F0-9])/;
|
|
10
10
|
class Hex {
|
|
11
|
+
value;
|
|
12
|
+
length;
|
|
13
|
+
qualifiedName;
|
|
11
14
|
constructor(input) {
|
|
12
15
|
this.length = input?.length ? input?.length : 1;
|
|
13
16
|
this.qualifiedName = input?.qualifiedName;
|
|
@@ -14,6 +14,9 @@ for (let n = 0; n < 0x100; n++) {
|
|
|
14
14
|
LUT_HEX_8b[n] = `${LUT_HEX_4b[(n >>> 4) & 0xF]}${LUT_HEX_4b[n & 0xF]}`;
|
|
15
15
|
}
|
|
16
16
|
class HexUInt8 {
|
|
17
|
+
value;
|
|
18
|
+
length;
|
|
19
|
+
qualifiedName;
|
|
17
20
|
constructor(input) {
|
|
18
21
|
this.length = input?.length ? input?.length : 1;
|
|
19
22
|
this.qualifiedName = input?.qualifiedName;
|
|
@@ -31,8 +31,10 @@ function toInteger(value, exception = true) {
|
|
|
31
31
|
return Math.round(parseFloat(value));
|
|
32
32
|
}
|
|
33
33
|
class Integer {
|
|
34
|
+
value;
|
|
35
|
+
constant = false;
|
|
36
|
+
qualifiedName;
|
|
34
37
|
constructor(input) {
|
|
35
|
-
this.constant = false;
|
|
36
38
|
this.value = 0;
|
|
37
39
|
this.qualifiedName = input?.qualifiedName;
|
|
38
40
|
}
|
|
@@ -11,6 +11,8 @@ const character_1 = require("./character");
|
|
|
11
11
|
const hex_uint8_1 = require("./hex_uint8");
|
|
12
12
|
const digits = new RegExp(/^\s*-?\+?\d+\.?\d* *$/i);
|
|
13
13
|
class Integer8 {
|
|
14
|
+
value;
|
|
15
|
+
qualifiedName;
|
|
14
16
|
constructor(input) {
|
|
15
17
|
this.value = 0n;
|
|
16
18
|
this.qualifiedName = input?.qualifiedName;
|
package/build/src/types/numc.js
CHANGED
|
@@ -7,6 +7,9 @@ const float_1 = require("./float");
|
|
|
7
7
|
const initialValues = {};
|
|
8
8
|
const regexCharacters = /[a-zA-Z]/g;
|
|
9
9
|
class Numc {
|
|
10
|
+
value;
|
|
11
|
+
length;
|
|
12
|
+
qualifiedName;
|
|
10
13
|
constructor(input) {
|
|
11
14
|
this.length = input?.length ? input?.length : 1;
|
|
12
15
|
this.qualifiedName = input?.qualifiedName;
|
|
@@ -6,6 +6,11 @@ const throw_error_1 = require("../throw_error");
|
|
|
6
6
|
const integer8_1 = require("./integer8");
|
|
7
7
|
const digits = new RegExp(/^\s*-?\+?\d*\.?\d* *$/i);
|
|
8
8
|
class Packed {
|
|
9
|
+
// todo: change this to bigint to get the proper precision? for larger than maxsafeint
|
|
10
|
+
value;
|
|
11
|
+
length;
|
|
12
|
+
decimals;
|
|
13
|
+
qualifiedName;
|
|
9
14
|
constructor(input) {
|
|
10
15
|
this.value = 0;
|
|
11
16
|
this.length = 666;
|
|
@@ -7,6 +7,11 @@ const _parse_1 = require("../operators/_parse");
|
|
|
7
7
|
const character_1 = require("./character");
|
|
8
8
|
const throw_error_1 = require("../throw_error");
|
|
9
9
|
class Structure {
|
|
10
|
+
value;
|
|
11
|
+
qualifiedName;
|
|
12
|
+
ddicName;
|
|
13
|
+
suffix;
|
|
14
|
+
asInclude;
|
|
10
15
|
constructor(fields, qualifiedName, ddicName, suffix, asInclude) {
|
|
11
16
|
this.value = fields;
|
|
12
17
|
this.qualifiedName = qualifiedName?.toUpperCase();
|
package/build/src/types/table.js
CHANGED
|
@@ -28,6 +28,9 @@ var TableKeyType;
|
|
|
28
28
|
TableKeyType["empty"] = "EMPTY";
|
|
29
29
|
})(TableKeyType || (exports.TableKeyType = TableKeyType = {}));
|
|
30
30
|
class LoopController {
|
|
31
|
+
index;
|
|
32
|
+
loopTo;
|
|
33
|
+
array;
|
|
31
34
|
constructor(from, loopTo, array) {
|
|
32
35
|
this.index = from;
|
|
33
36
|
this.loopTo = loopTo;
|
|
@@ -64,6 +67,14 @@ export class SortedTable {
|
|
|
64
67
|
}
|
|
65
68
|
*/
|
|
66
69
|
class HashedTable {
|
|
70
|
+
value;
|
|
71
|
+
header;
|
|
72
|
+
rowType;
|
|
73
|
+
loops;
|
|
74
|
+
options;
|
|
75
|
+
qualifiedName;
|
|
76
|
+
isStructured;
|
|
77
|
+
secondaryIndexes;
|
|
67
78
|
constructor(rowType, options, qualifiedName) {
|
|
68
79
|
this.value = {};
|
|
69
80
|
this.secondaryIndexes = {};
|
|
@@ -297,6 +308,14 @@ class HashedTable {
|
|
|
297
308
|
}
|
|
298
309
|
exports.HashedTable = HashedTable;
|
|
299
310
|
class Table {
|
|
311
|
+
value;
|
|
312
|
+
header;
|
|
313
|
+
rowType;
|
|
314
|
+
loops;
|
|
315
|
+
options;
|
|
316
|
+
qualifiedName;
|
|
317
|
+
isStructured;
|
|
318
|
+
secondaryIndexes;
|
|
300
319
|
constructor(rowType, options, qualifiedName) {
|
|
301
320
|
this.value = [];
|
|
302
321
|
this.secondaryIndexes = {};
|
package/build/src/types/time.js
CHANGED
|
@@ -7,6 +7,8 @@ const character_1 = require("./character");
|
|
|
7
7
|
const throw_error_1 = require("../throw_error");
|
|
8
8
|
const integer8_1 = require("./integer8");
|
|
9
9
|
class XString {
|
|
10
|
+
value;
|
|
11
|
+
qualifiedName;
|
|
10
12
|
constructor(input) {
|
|
11
13
|
this.value = "";
|
|
12
14
|
this.qualifiedName = input?.qualifiedName;
|