@abaplint/core 2.120.16 → 2.120.18
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
CHANGED
|
@@ -6774,6 +6774,9 @@ declare class SimpleTarget extends Expression {
|
|
|
6774
6774
|
}
|
|
6775
6775
|
|
|
6776
6776
|
declare class SimpleType extends AbstractType {
|
|
6777
|
+
private static readonly singleton;
|
|
6778
|
+
static get(): SimpleType;
|
|
6779
|
+
private constructor();
|
|
6777
6780
|
toText(): string;
|
|
6778
6781
|
toABAP(): string;
|
|
6779
6782
|
isGeneric(): boolean;
|
|
@@ -674,7 +674,7 @@ BuiltIn.methods = {
|
|
|
674
674
|
counter: BuiltIn.counter++,
|
|
675
675
|
mandatory: {
|
|
676
676
|
"val": basic_1.CLikeType.get(),
|
|
677
|
-
"format": basic_1.
|
|
677
|
+
"format": basic_1.SimpleType.get(),
|
|
678
678
|
},
|
|
679
679
|
return: basic_1.StringType.get(),
|
|
680
680
|
release: version_1.Release.v702,
|
|
@@ -866,17 +866,17 @@ BuiltIn.methods = {
|
|
|
866
866
|
"NMAX": {
|
|
867
867
|
counter: BuiltIn.counter++,
|
|
868
868
|
mandatory: {
|
|
869
|
-
"val1": basic_1.
|
|
870
|
-
"val2": basic_1.
|
|
869
|
+
"val1": basic_1.SimpleType.get(),
|
|
870
|
+
"val2": basic_1.SimpleType.get(),
|
|
871
871
|
},
|
|
872
872
|
optional: {
|
|
873
|
-
"val3": basic_1.
|
|
874
|
-
"val4": basic_1.
|
|
875
|
-
"val5": basic_1.
|
|
876
|
-
"val6": basic_1.
|
|
877
|
-
"val7": basic_1.
|
|
878
|
-
"val8": basic_1.
|
|
879
|
-
"val9": basic_1.
|
|
873
|
+
"val3": basic_1.SimpleType.get(),
|
|
874
|
+
"val4": basic_1.SimpleType.get(),
|
|
875
|
+
"val5": basic_1.SimpleType.get(),
|
|
876
|
+
"val6": basic_1.SimpleType.get(),
|
|
877
|
+
"val7": basic_1.SimpleType.get(),
|
|
878
|
+
"val8": basic_1.SimpleType.get(),
|
|
879
|
+
"val9": basic_1.SimpleType.get(),
|
|
880
880
|
},
|
|
881
881
|
return: basic_1.IntegerType.get(),
|
|
882
882
|
release: version_1.Release.v702,
|
|
@@ -884,17 +884,17 @@ BuiltIn.methods = {
|
|
|
884
884
|
"NMIN": {
|
|
885
885
|
counter: BuiltIn.counter++,
|
|
886
886
|
mandatory: {
|
|
887
|
-
"val1": basic_1.
|
|
888
|
-
"val2": basic_1.
|
|
887
|
+
"val1": basic_1.SimpleType.get(),
|
|
888
|
+
"val2": basic_1.SimpleType.get(),
|
|
889
889
|
},
|
|
890
890
|
optional: {
|
|
891
|
-
"val3": basic_1.
|
|
892
|
-
"val4": basic_1.
|
|
893
|
-
"val5": basic_1.
|
|
894
|
-
"val6": basic_1.
|
|
895
|
-
"val7": basic_1.
|
|
896
|
-
"val8": basic_1.
|
|
897
|
-
"val9": basic_1.
|
|
891
|
+
"val3": basic_1.SimpleType.get(),
|
|
892
|
+
"val4": basic_1.SimpleType.get(),
|
|
893
|
+
"val5": basic_1.SimpleType.get(),
|
|
894
|
+
"val6": basic_1.SimpleType.get(),
|
|
895
|
+
"val7": basic_1.SimpleType.get(),
|
|
896
|
+
"val8": basic_1.SimpleType.get(),
|
|
897
|
+
"val9": basic_1.SimpleType.get(),
|
|
898
898
|
},
|
|
899
899
|
return: basic_1.IntegerType.get(),
|
|
900
900
|
release: version_1.Release.v702,
|
|
@@ -910,7 +910,7 @@ BuiltIn.methods = {
|
|
|
910
910
|
counter: BuiltIn.counter++,
|
|
911
911
|
mandatory: {
|
|
912
912
|
"val": basic_1.CLikeType.get(),
|
|
913
|
-
"occ": basic_1.
|
|
913
|
+
"occ": basic_1.SimpleType.get(),
|
|
914
914
|
},
|
|
915
915
|
return: basic_1.StringType.get(),
|
|
916
916
|
release: version_1.Release.v702,
|
|
@@ -332,7 +332,7 @@ class TypeUtils {
|
|
|
332
332
|
return this.isAssignable(source, target);
|
|
333
333
|
}
|
|
334
334
|
isAssignableStrict(source, target, node) {
|
|
335
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
335
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
336
336
|
const calculated = node ? this.isCalculated(node) : false;
|
|
337
337
|
/*
|
|
338
338
|
console.dir(source);
|
|
@@ -343,9 +343,23 @@ class TypeUtils {
|
|
|
343
343
|
&& (target instanceof basic_1.XStringType || target instanceof basic_1.XSequenceType)) {
|
|
344
344
|
return false;
|
|
345
345
|
}
|
|
346
|
+
if (target instanceof basic_1.NumericType
|
|
347
|
+
&& (source instanceof basic_1.CharacterType || source instanceof basic_1.StringType)
|
|
348
|
+
&& ((_a = source.getAbstractTypeData()) === null || _a === void 0 ? void 0 : _a.derivedFromConstant) === true) {
|
|
349
|
+
const constant = node === null || node === void 0 ? void 0 : node.concatTokens();
|
|
350
|
+
if (constant !== undefined
|
|
351
|
+
&& ((constant.startsWith("'") && constant.endsWith("'"))
|
|
352
|
+
|| (constant.startsWith("`") && constant.endsWith("`")))
|
|
353
|
+
&& /^\d*$/.test(constant.substring(1, constant.length - 1)) === false) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
346
357
|
if (calculated) {
|
|
347
358
|
return this.isAssignable(source, target);
|
|
348
359
|
}
|
|
360
|
+
if (target instanceof basic_1.CLikeType) {
|
|
361
|
+
return this.isCharLikeStrict(source);
|
|
362
|
+
}
|
|
349
363
|
if (target instanceof basic_1.PGenericType) {
|
|
350
364
|
return source instanceof basic_1.PackedType
|
|
351
365
|
|| source instanceof basic_1.PGenericType
|
|
@@ -356,25 +370,25 @@ class TypeUtils {
|
|
|
356
370
|
}
|
|
357
371
|
if (source instanceof basic_1.CharacterType) {
|
|
358
372
|
if (target instanceof basic_1.CharacterType) {
|
|
359
|
-
if (((
|
|
373
|
+
if (((_b = source.getAbstractTypeData()) === null || _b === void 0 ? void 0 : _b.derivedFromConstant) === true) {
|
|
360
374
|
return source.getLength() <= target.getLength();
|
|
361
375
|
}
|
|
362
376
|
return source.getLength() === target.getLength();
|
|
363
377
|
}
|
|
364
378
|
else if (target instanceof basic_1.IntegerType) {
|
|
365
|
-
if (((
|
|
379
|
+
if (((_c = source.getAbstractTypeData()) === null || _c === void 0 ? void 0 : _c.derivedFromConstant) === true) {
|
|
366
380
|
return true;
|
|
367
381
|
}
|
|
368
382
|
return false;
|
|
369
383
|
}
|
|
370
384
|
else if (target instanceof basic_1.XStringType) {
|
|
371
|
-
if (((
|
|
385
|
+
if (((_d = source.getAbstractTypeData()) === null || _d === void 0 ? void 0 : _d.derivedFromConstant) === true) {
|
|
372
386
|
return (node === null || node === void 0 ? void 0 : node.concatTokens()) !== "''";
|
|
373
387
|
}
|
|
374
388
|
return false;
|
|
375
389
|
}
|
|
376
390
|
else if (target instanceof basic_1.StringType) {
|
|
377
|
-
if (((
|
|
391
|
+
if (((_e = source.getAbstractTypeData()) === null || _e === void 0 ? void 0 : _e.derivedFromConstant) === true) {
|
|
378
392
|
return true;
|
|
379
393
|
}
|
|
380
394
|
return false;
|
|
@@ -382,7 +396,7 @@ class TypeUtils {
|
|
|
382
396
|
}
|
|
383
397
|
else if (source instanceof basic_1.HexType) {
|
|
384
398
|
if (target instanceof basic_1.HexType) {
|
|
385
|
-
if (((
|
|
399
|
+
if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
|
|
386
400
|
return source.getLength() <= target.getLength();
|
|
387
401
|
}
|
|
388
402
|
return source.getLength() === target.getLength();
|
|
@@ -391,7 +405,7 @@ class TypeUtils {
|
|
|
391
405
|
return false;
|
|
392
406
|
}
|
|
393
407
|
else if (target instanceof basic_1.IntegerType || target instanceof basic_1.Integer8Type) {
|
|
394
|
-
if (((
|
|
408
|
+
if (((_g = source.getAbstractTypeData()) === null || _g === void 0 ? void 0 : _g.derivedFromConstant) === true) {
|
|
395
409
|
return true;
|
|
396
410
|
}
|
|
397
411
|
return false;
|
|
@@ -402,13 +416,13 @@ class TypeUtils {
|
|
|
402
416
|
return false;
|
|
403
417
|
}
|
|
404
418
|
else if (target instanceof basic_1.CharacterType) {
|
|
405
|
-
if (((
|
|
419
|
+
if (((_h = source.getAbstractTypeData()) === null || _h === void 0 ? void 0 : _h.derivedFromConstant) === true) {
|
|
406
420
|
return true;
|
|
407
421
|
}
|
|
408
422
|
return false;
|
|
409
423
|
}
|
|
410
424
|
else if (target instanceof basic_1.IntegerType) {
|
|
411
|
-
if (((
|
|
425
|
+
if (((_j = source.getAbstractTypeData()) === null || _j === void 0 ? void 0 : _j.derivedFromConstant) === true) {
|
|
412
426
|
return true;
|
|
413
427
|
}
|
|
414
428
|
return false;
|
|
@@ -418,7 +432,7 @@ class TypeUtils {
|
|
|
418
432
|
return false;
|
|
419
433
|
}
|
|
420
434
|
else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
|
|
421
|
-
if (((
|
|
435
|
+
if (((_k = source.getAbstractTypeData()) === null || _k === void 0 ? void 0 : _k.derivedFromConstant) === true) {
|
|
422
436
|
return true;
|
|
423
437
|
}
|
|
424
438
|
return false;
|
|
@@ -462,7 +476,7 @@ class TypeUtils {
|
|
|
462
476
|
return false;
|
|
463
477
|
}
|
|
464
478
|
else if (target instanceof basic_1.Integer8Type || target instanceof basic_1.PackedType) {
|
|
465
|
-
if (((
|
|
479
|
+
if (((_l = source.getAbstractTypeData()) === null || _l === void 0 ? void 0 : _l.derivedFromConstant) === true) {
|
|
466
480
|
return true;
|
|
467
481
|
}
|
|
468
482
|
return false;
|
|
@@ -3,6 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SimpleType = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class SimpleType extends _abstract_type_1.AbstractType {
|
|
6
|
+
static get() {
|
|
7
|
+
return this.singleton;
|
|
8
|
+
}
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
}
|
|
6
12
|
toText() {
|
|
7
13
|
return "```simple```";
|
|
8
14
|
}
|
|
@@ -20,4 +26,5 @@ class SimpleType extends _abstract_type_1.AbstractType {
|
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
28
|
exports.SimpleType = SimpleType;
|
|
29
|
+
SimpleType.singleton = new SimpleType();
|
|
23
30
|
//# sourceMappingURL=simple_type.js.map
|
package/build/src/ddic.js
CHANGED
|
@@ -109,7 +109,7 @@ class DDIC {
|
|
|
109
109
|
case "ANY":
|
|
110
110
|
return Types.AnyType.get({ qualifiedName: qualifiedName });
|
|
111
111
|
case "SIMPLE":
|
|
112
|
-
return
|
|
112
|
+
return Types.SimpleType.get();
|
|
113
113
|
case "%_C_POINTER":
|
|
114
114
|
return new Types.HexType(8, qualifiedName);
|
|
115
115
|
case "TABLE":
|
package/build/src/registry.js
CHANGED