@abaplint/core 2.93.71 → 2.93.73
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/abaplint.d.ts +10 -0
- package/build/src/abap/2_statements/expressions/index.js +1 -0
- package/build/src/abap/2_statements/expressions/kernel_id.js +13 -0
- package/build/src/abap/2_statements/expressions/type_table.js +1 -1
- package/build/src/abap/2_statements/statements/call_kernel.js +1 -2
- package/build/src/abap/2_statements/statements/method_def.js +1 -1
- package/build/src/abap/5_syntax/basic_types.js +31 -5
- package/build/src/abap/5_syntax/statements/call_kernel.js +14 -0
- package/build/src/abap/5_syntax/statements/modify_database.js +8 -1
- package/build/src/abap/5_syntax/syntax.js +2 -0
- package/build/src/abap/types/method_parameters.js +38 -15
- package/build/src/ddic.js +18 -16
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -1391,6 +1391,10 @@ declare class DDIC {
|
|
|
1391
1391
|
inErrorNamespace(name: string | undefined): boolean;
|
|
1392
1392
|
lookupObject(name: string): ILookupResult;
|
|
1393
1393
|
lookupNoVoid(name: string): ILookupResult | undefined;
|
|
1394
|
+
lookupDDLS(name?: string): {
|
|
1395
|
+
type: AbstractType;
|
|
1396
|
+
object: DataDefinition;
|
|
1397
|
+
} | undefined;
|
|
1394
1398
|
/** lookup with voiding and unknown types */
|
|
1395
1399
|
lookup(name: string): ILookupResult;
|
|
1396
1400
|
lookupDomain(name: string, parent?: string): ILookupResult;
|
|
@@ -1941,6 +1945,7 @@ declare namespace Expressions {
|
|
|
1941
1945
|
InlineFS,
|
|
1942
1946
|
Integer,
|
|
1943
1947
|
InterfaceName,
|
|
1948
|
+
KernelId,
|
|
1944
1949
|
Language,
|
|
1945
1950
|
Length,
|
|
1946
1951
|
Let,
|
|
@@ -3578,6 +3583,10 @@ declare interface ITypeDefinitions {
|
|
|
3578
3583
|
getByName(name: string): TypedIdentifier | undefined;
|
|
3579
3584
|
}
|
|
3580
3585
|
|
|
3586
|
+
declare class KernelId extends Expression {
|
|
3587
|
+
getRunnable(): IStatementRunnable;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3581
3590
|
declare class Language extends Expression {
|
|
3582
3591
|
getRunnable(): IStatementRunnable;
|
|
3583
3592
|
}
|
|
@@ -3900,6 +3909,7 @@ declare class MethodParameters_2 implements IMethodParameters {
|
|
|
3900
3909
|
getExceptions(): string[];
|
|
3901
3910
|
getParameterDefault(parameter: string): ExpressionNode;
|
|
3902
3911
|
private parse;
|
|
3912
|
+
private workaroundRAP;
|
|
3903
3913
|
private add;
|
|
3904
3914
|
}
|
|
3905
3915
|
|
|
@@ -98,6 +98,7 @@ __exportStar(require("./inlinedata"), exports);
|
|
|
98
98
|
__exportStar(require("./inlinefs"), exports);
|
|
99
99
|
__exportStar(require("./integer"), exports);
|
|
100
100
|
__exportStar(require("./interface_name"), exports);
|
|
101
|
+
__exportStar(require("./kernel_id"), exports);
|
|
101
102
|
__exportStar(require("./language"), exports);
|
|
102
103
|
__exportStar(require("./length"), exports);
|
|
103
104
|
__exportStar(require("./let"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KernelId = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
const source_1 = require("./source");
|
|
6
|
+
class KernelId extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const field = (0, combi_1.seq)("ID", source_1.Source, "FIELD", source_1.Source);
|
|
9
|
+
return field;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.KernelId = KernelId;
|
|
13
|
+
//# sourceMappingURL=kernel_id.js.map
|
|
@@ -18,7 +18,7 @@ class TypeTable extends combi_1.Expression {
|
|
|
18
18
|
// "WITH" is not allowed as a field name in keys
|
|
19
19
|
const typetable = (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial))));
|
|
20
20
|
const occurs = (0, combi_1.seq)("OCCURS", _1.Integer);
|
|
21
|
-
const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("
|
|
21
|
+
const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "FAILED", "LOCK", "READ RESULT", "UPDATE"), _1.TypeName));
|
|
22
22
|
const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
23
23
|
const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
|
|
24
24
|
const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, derived)));
|
|
@@ -6,8 +6,7 @@ const expressions_1 = require("../expressions");
|
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
7
|
class CallKernel {
|
|
8
8
|
getMatcher() {
|
|
9
|
-
const
|
|
10
|
-
const ret = (0, combi_1.seq)("CALL", (0, combi_1.altPrio)(expressions_1.Constant, expressions_1.Field), (0, combi_1.starPrio)(field));
|
|
9
|
+
const ret = (0, combi_1.seq)("CALL", (0, combi_1.altPrio)(expressions_1.Constant, expressions_1.Field), (0, combi_1.starPrio)(expressions_1.KernelId));
|
|
11
10
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
12
11
|
}
|
|
13
12
|
}
|
|
@@ -17,7 +17,7 @@ class MethodDef {
|
|
|
17
17
|
const link = (0, combi_1.seq)("LINK", expressions_1.MethodParamName);
|
|
18
18
|
const full = (0, combi_1.seq)("FULL", expressions_1.MethodParamName);
|
|
19
19
|
const modify = (0, combi_1.alt)((0, combi_1.seq)("FOR ACTION", expressions_1.TypeName, result), (0, combi_1.seq)("FOR CREATE", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation)), (0, combi_1.seq)("FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("FOR UPDATE", expressions_1.TypeName));
|
|
20
|
-
const behavior = (0, combi_1.altPrio)((0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("READ IMPORTING", expressions_1.MethodParamName, "FOR READ", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName));
|
|
20
|
+
const behavior = (0, combi_1.altPrio)((0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("READ IMPORTING", expressions_1.MethodParamName, "FOR READ", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR CREATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR READ", expressions_1.TypeName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR LOCK", expressions_1.TypeName), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName));
|
|
21
21
|
// todo, this is only from version something
|
|
22
22
|
const amdp = (0, combi_1.seq)("AMDP OPTIONS CDS SESSION CLIENT CURRENT", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));
|
|
23
23
|
const ret = (0, combi_1.seq)((0, combi_1.altPrio)("CLASS-METHODS", "METHODS"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)("FOR", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, "NOT AT END OF MODE", (0, combi_1.optPrio)(expressions_1.Redefinition)));
|
|
@@ -262,7 +262,7 @@ class BasicTypes {
|
|
|
262
262
|
return undefined;
|
|
263
263
|
}
|
|
264
264
|
parseTable(node, name) {
|
|
265
|
-
var _a;
|
|
265
|
+
var _a, _b;
|
|
266
266
|
const typename = node.findFirstExpression(Expressions.TypeName);
|
|
267
267
|
const text = (_a = node.findFirstExpression(Expressions.TypeTable)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
268
268
|
if (text === undefined) {
|
|
@@ -354,6 +354,20 @@ class BasicTypes {
|
|
|
354
354
|
], name);
|
|
355
355
|
return new Types.TableType(structure, options);
|
|
356
356
|
}
|
|
357
|
+
else if (typename && (text.startsWith("TYPE TABLE FOR CREATE ")
|
|
358
|
+
|| text.startsWith("TYPE TABLE FOR UPDATE "))) {
|
|
359
|
+
const name = typename.concatTokens();
|
|
360
|
+
const type = (_b = this.scope.getDDIC().lookupDDLS(name)) === null || _b === void 0 ? void 0 : _b.type;
|
|
361
|
+
if (type) {
|
|
362
|
+
return new Types.TableType(type, options);
|
|
363
|
+
}
|
|
364
|
+
else if (this.scope.getDDIC().inErrorNamespace(name)) {
|
|
365
|
+
return new Types.UnknownType(`DDLS ${name} not found`);
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
return new Types.VoidType(name);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
357
371
|
// fallback to old style syntax, OCCURS etc
|
|
358
372
|
return this.parseType(node, name);
|
|
359
373
|
}
|
|
@@ -555,10 +569,19 @@ class BasicTypes {
|
|
|
555
569
|
const foo = varVar === null || varVar === void 0 ? void 0 : varVar.getType();
|
|
556
570
|
if (foo instanceof basic_1.ObjectReferenceType) {
|
|
557
571
|
const typeName = subs[0];
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
572
|
+
let id = foo.getIdentifier();
|
|
573
|
+
if (!(id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition)) {
|
|
574
|
+
const found = this.scope.findObjectDefinition(foo.getIdentifierName());
|
|
575
|
+
if (found) {
|
|
576
|
+
id = found;
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
return new Types.UnknownType(foo.getIdentifierName() + " not found in scope");
|
|
580
|
+
}
|
|
581
|
+
}
|
|
561
582
|
if (id instanceof types_1.ClassDefinition || id instanceof types_1.InterfaceDefinition) {
|
|
583
|
+
const type = id instanceof types_1.ClassDefinition ? "CLAS" : "INTF";
|
|
584
|
+
this.scope.addReference(expr.getFirstToken(), id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: type, ooName: id.getName() });
|
|
562
585
|
const byName = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(id, typeName);
|
|
563
586
|
foundType = byName === null || byName === void 0 ? void 0 : byName.getType();
|
|
564
587
|
if (byName === undefined || foundType === undefined) {
|
|
@@ -566,12 +589,15 @@ class BasicTypes {
|
|
|
566
589
|
}
|
|
567
590
|
this.scope.addReference(expr.getTokens()[2], byName, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
568
591
|
}
|
|
592
|
+
else {
|
|
593
|
+
return new Types.UnknownType("Not a object reference, " + className + ", " + id.constructor.name);
|
|
594
|
+
}
|
|
569
595
|
}
|
|
570
596
|
else if (foo === undefined) {
|
|
571
597
|
return new Types.UnknownType(className + " not found in scope");
|
|
572
598
|
}
|
|
573
599
|
else {
|
|
574
|
-
return new Types.UnknownType("Not a object reference, " + className);
|
|
600
|
+
return new Types.UnknownType("Not a object reference, " + className + ", " + foo.constructor.name);
|
|
575
601
|
}
|
|
576
602
|
}
|
|
577
603
|
else {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CallKernel = void 0;
|
|
4
|
+
const Expressions = require("../../2_statements/expressions");
|
|
5
|
+
const source_1 = require("../expressions/source");
|
|
6
|
+
class CallKernel {
|
|
7
|
+
runSyntax(node, scope, filename) {
|
|
8
|
+
for (const s of node.findAllExpressions(Expressions.Source)) {
|
|
9
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.CallKernel = CallKernel;
|
|
14
|
+
//# sourceMappingURL=call_kernel.js.map
|
|
@@ -12,7 +12,14 @@ class ModifyDatabase {
|
|
|
12
12
|
}
|
|
13
13
|
const dbtab = node.findFirstExpression(Expressions.DatabaseTable);
|
|
14
14
|
if (dbtab !== undefined) {
|
|
15
|
-
|
|
15
|
+
try {
|
|
16
|
+
new database_table_1.DatabaseTable().runSyntax(dbtab, scope, filename);
|
|
17
|
+
}
|
|
18
|
+
catch (e) {
|
|
19
|
+
if (scope.findVariable(dbtab.concatTokens()) === undefined) {
|
|
20
|
+
throw e;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
for (const s of node.findAllExpressions(Expressions.Source)) {
|
|
18
25
|
new source_1.Source().runSyntax(s, scope, filename);
|
|
@@ -114,6 +114,7 @@ const transfer_1 = require("./statements/transfer");
|
|
|
114
114
|
const modify_database_1 = require("./statements/modify_database");
|
|
115
115
|
const truncate_dataset_1 = require("./statements/truncate_dataset");
|
|
116
116
|
const call_badi_1 = require("./statements/call_badi");
|
|
117
|
+
const call_kernel_1 = require("./statements/call_kernel");
|
|
117
118
|
const pack_1 = require("./statements/pack");
|
|
118
119
|
const unpack_1 = require("./statements/unpack");
|
|
119
120
|
const format_1 = require("./statements/format");
|
|
@@ -256,6 +257,7 @@ if (Object.keys(map).length === 0) {
|
|
|
256
257
|
addToMap(new read_entities_1.ReadEntities());
|
|
257
258
|
addToMap(new modify_entities_1.ModifyEntities());
|
|
258
259
|
addToMap(new commit_entities_1.CommitEntities());
|
|
260
|
+
addToMap(new call_kernel_1.CallKernel());
|
|
259
261
|
}
|
|
260
262
|
// -----------------------------------
|
|
261
263
|
class SyntaxLogic {
|
|
@@ -147,21 +147,6 @@ class MethodParameters {
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
// RAP parameters, temporary fix
|
|
151
|
-
let rapName = node.findExpressionAfterToken("IMPORTING");
|
|
152
|
-
if (rapName) {
|
|
153
|
-
const token = rapName.getFirstToken();
|
|
154
|
-
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType("RapMethodParameter"), ["importing" /* IdentifierMeta.MethodImporting */]));
|
|
155
|
-
if (node.concatTokens().toUpperCase().includes(" FOR VALIDATE ON SAVE")) {
|
|
156
|
-
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
157
|
-
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "reported"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
rapName = node.findExpressionAfterToken("RESULT");
|
|
161
|
-
if (rapName) {
|
|
162
|
-
const token = rapName.getFirstToken();
|
|
163
|
-
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
164
|
-
}
|
|
165
150
|
const exporting = node.findFirstExpression(Expressions.MethodDefExporting);
|
|
166
151
|
if (exporting) {
|
|
167
152
|
this.add(this.exporting, exporting, scope, ["exporting" /* IdentifierMeta.MethodExporting */]);
|
|
@@ -174,6 +159,44 @@ class MethodParameters {
|
|
|
174
159
|
if (returning) {
|
|
175
160
|
this.returning = new method_def_returning_1.MethodDefReturning().runSyntax(returning, scope, this.filename, ["returning" /* IdentifierMeta.MethodReturning */]);
|
|
176
161
|
}
|
|
162
|
+
this.workaroundRAP(node, scope, filename);
|
|
163
|
+
}
|
|
164
|
+
workaroundRAP(node, scope, filename) {
|
|
165
|
+
const resultName = node.findExpressionAfterToken("RESULT");
|
|
166
|
+
const isRap = node.findExpressionAfterToken("IMPORTING");
|
|
167
|
+
if (isRap) {
|
|
168
|
+
for (const foo of node.findDirectExpressions(Expressions.MethodParamName)) {
|
|
169
|
+
if (foo === resultName) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
this.importing.push(new _typed_identifier_1.TypedIdentifier(foo.getFirstToken(), filename, new basic_1.VoidType("RapMethodParameter"), ["importing" /* IdentifierMeta.MethodImporting */]));
|
|
173
|
+
}
|
|
174
|
+
if (node.concatTokens().toUpperCase().includes(" FOR VALIDATE ")
|
|
175
|
+
|| node.concatTokens().toUpperCase().includes(" FOR BEHAVIOR ")
|
|
176
|
+
|| node.concatTokens().toUpperCase().includes(" FOR MODIFY ")) {
|
|
177
|
+
const token = isRap.getFirstToken();
|
|
178
|
+
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
179
|
+
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "mapped"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
180
|
+
this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "reported"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (resultName) {
|
|
184
|
+
const token = resultName.getFirstToken();
|
|
185
|
+
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
|
|
186
|
+
}
|
|
187
|
+
// its some kind of magic
|
|
188
|
+
if (scope.getName().toUpperCase() === "CL_ABAP_BEHAVIOR_SAVER") {
|
|
189
|
+
const tempChanging = this.changing.map(c => new _typed_identifier_1.TypedIdentifier(c.getToken(), filename, new basic_1.VoidType("RapMethodParameter"), c.getMeta()));
|
|
190
|
+
while (this.changing.length > 0) {
|
|
191
|
+
this.changing.shift();
|
|
192
|
+
}
|
|
193
|
+
this.changing.push(...tempChanging);
|
|
194
|
+
const tempImporting = this.importing.map(c => new _typed_identifier_1.TypedIdentifier(c.getToken(), filename, new basic_1.VoidType("RapMethodParameter"), c.getMeta()));
|
|
195
|
+
while (this.importing.length > 0) {
|
|
196
|
+
this.importing.shift();
|
|
197
|
+
}
|
|
198
|
+
this.importing.push(...tempImporting);
|
|
199
|
+
}
|
|
177
200
|
}
|
|
178
201
|
add(target, source, scope, meta) {
|
|
179
202
|
var _a;
|
package/build/src/ddic.js
CHANGED
|
@@ -143,7 +143,6 @@ class DDIC {
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
lookupNoVoid(name) {
|
|
146
|
-
var _a;
|
|
147
146
|
const foundTABL = this.reg.getObject("TABL", name);
|
|
148
147
|
if (foundTABL) {
|
|
149
148
|
return { type: foundTABL.parseType(this.reg), object: foundTABL };
|
|
@@ -160,11 +159,22 @@ class DDIC {
|
|
|
160
159
|
if (foundDTEL) {
|
|
161
160
|
return { type: foundDTEL.parseType(this.reg), object: foundDTEL };
|
|
162
161
|
}
|
|
162
|
+
const foundDDLS = this.lookupDDLS(name);
|
|
163
|
+
if (foundDDLS) {
|
|
164
|
+
return foundDDLS;
|
|
165
|
+
}
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
lookupDDLS(name) {
|
|
169
|
+
var _a;
|
|
170
|
+
if (name === undefined) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
163
173
|
const upper = name.toUpperCase();
|
|
164
174
|
for (const obj of this.reg.getObjectsByType("DDLS")) {
|
|
165
175
|
const ddls = obj;
|
|
166
176
|
if (ddls.getSQLViewName() === upper || ((_a = ddls.getDefinitionName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === upper) {
|
|
167
|
-
return { type: ddls.parseType(this.reg), object:
|
|
177
|
+
return { type: ddls.parseType(this.reg), object: ddls };
|
|
168
178
|
}
|
|
169
179
|
}
|
|
170
180
|
return undefined;
|
|
@@ -210,7 +220,6 @@ class DDIC {
|
|
|
210
220
|
}
|
|
211
221
|
}
|
|
212
222
|
lookupTableOrView(name) {
|
|
213
|
-
var _a;
|
|
214
223
|
if (name === undefined) {
|
|
215
224
|
return { type: new Types.UnknownType("undefined, lookupTableOrView") };
|
|
216
225
|
}
|
|
@@ -218,18 +227,14 @@ class DDIC {
|
|
|
218
227
|
if (foundTABL) {
|
|
219
228
|
return { type: foundTABL.parseType(this.reg), object: foundTABL };
|
|
220
229
|
}
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
if (ddls.getSQLViewName() === upper || ((_a = ddls.getDefinitionName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === upper) {
|
|
225
|
-
return { type: ddls.parseType(this.reg), object: ddls };
|
|
226
|
-
}
|
|
230
|
+
const foundDDLS = this.lookupDDLS(name);
|
|
231
|
+
if (foundDDLS) {
|
|
232
|
+
return foundDDLS;
|
|
227
233
|
}
|
|
228
234
|
return this.lookupView(name);
|
|
229
235
|
}
|
|
230
236
|
/** this method only looks up the object, does not parse the type */
|
|
231
237
|
lookupTableOrView2(name) {
|
|
232
|
-
var _a;
|
|
233
238
|
if (name === undefined) {
|
|
234
239
|
return undefined;
|
|
235
240
|
}
|
|
@@ -241,12 +246,9 @@ class DDIC {
|
|
|
241
246
|
if (foundVIEW) {
|
|
242
247
|
return foundVIEW;
|
|
243
248
|
}
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
if (ddls.getSQLViewName() === upper || ((_a = ddls.getDefinitionName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === upper) {
|
|
248
|
-
return ddls;
|
|
249
|
-
}
|
|
249
|
+
const foundDDLS = this.lookupDDLS(name);
|
|
250
|
+
if (foundDDLS) {
|
|
251
|
+
return foundDDLS.object;
|
|
250
252
|
}
|
|
251
253
|
return undefined;
|
|
252
254
|
}
|
package/build/src/registry.js
CHANGED