@abaplint/core 2.105.19 → 2.105.20
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 +9 -0
- package/build/src/abap/5_syntax/_type_utils.js +8 -1
- package/build/src/abap/5_syntax/basic_types.js +1 -1
- package/build/src/abap/5_syntax/expressions/dereference.js +1 -0
- package/build/src/abap/5_syntax/statements/loop.js +1 -0
- package/build/src/abap/types/basic/data_reference_type.js +4 -1
- package/build/src/abap/types/basic/data_type.js +23 -0
- package/build/src/abap/types/basic/index.js +1 -0
- package/build/src/ddic.js +1 -1
- package/build/src/objects/table_type.js +1 -1
- package/build/src/registry.js +1 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -438,6 +438,7 @@ declare namespace BasicTypes {
|
|
|
438
438
|
CLikeType,
|
|
439
439
|
CSequenceType,
|
|
440
440
|
DataReference,
|
|
441
|
+
DataType,
|
|
441
442
|
DateType,
|
|
442
443
|
DecFloatType,
|
|
443
444
|
DecFloat16Type,
|
|
@@ -1556,6 +1557,14 @@ declare class DataReference extends AbstractType {
|
|
|
1556
1557
|
toCDS(): string;
|
|
1557
1558
|
}
|
|
1558
1559
|
|
|
1560
|
+
declare class DataType extends AbstractType {
|
|
1561
|
+
toText(): string;
|
|
1562
|
+
toABAP(): string;
|
|
1563
|
+
isGeneric(): boolean;
|
|
1564
|
+
containsVoid(): boolean;
|
|
1565
|
+
toCDS(): string;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1559
1568
|
declare class DateType extends AbstractType {
|
|
1560
1569
|
toText(): string;
|
|
1561
1570
|
isGeneric(): boolean;
|
|
@@ -74,6 +74,7 @@ class TypeUtils {
|
|
|
74
74
|
|| type instanceof basic_1.CSequenceType
|
|
75
75
|
|| type instanceof cgeneric_type_1.CGenericType
|
|
76
76
|
|| type instanceof basic_1.DateType
|
|
77
|
+
|| type instanceof basic_1.DataType
|
|
77
78
|
|| type instanceof basic_1.CLikeType
|
|
78
79
|
|| type instanceof basic_1.PackedType
|
|
79
80
|
|| type instanceof basic_1.TimeType) {
|
|
@@ -304,7 +305,9 @@ class TypeUtils {
|
|
|
304
305
|
else if (target instanceof basic_1.CLikeType) {
|
|
305
306
|
return this.isCharLikeStrict(source);
|
|
306
307
|
}
|
|
307
|
-
else if (target instanceof basic_1.VoidType
|
|
308
|
+
else if (target instanceof basic_1.VoidType
|
|
309
|
+
|| target instanceof basic_1.AnyType
|
|
310
|
+
|| target instanceof basic_1.DataType) {
|
|
308
311
|
return true;
|
|
309
312
|
}
|
|
310
313
|
return false;
|
|
@@ -366,6 +369,7 @@ class TypeUtils {
|
|
|
366
369
|
}
|
|
367
370
|
if (source instanceof basic_1.VoidType
|
|
368
371
|
|| source instanceof basic_1.AnyType
|
|
372
|
+
|| source instanceof basic_1.DataType
|
|
369
373
|
|| source instanceof basic_1.UnknownType) {
|
|
370
374
|
return true;
|
|
371
375
|
}
|
|
@@ -410,6 +414,7 @@ class TypeUtils {
|
|
|
410
414
|
if (source instanceof basic_1.ObjectReferenceType
|
|
411
415
|
|| source instanceof basic_1.GenericObjectReferenceType
|
|
412
416
|
|| source instanceof basic_1.VoidType
|
|
417
|
+
|| source instanceof basic_1.DataType
|
|
413
418
|
|| source instanceof basic_1.AnyType
|
|
414
419
|
|| source instanceof basic_1.UnknownType) {
|
|
415
420
|
return true;
|
|
@@ -419,6 +424,7 @@ class TypeUtils {
|
|
|
419
424
|
else if (target instanceof basic_1.DataReference) {
|
|
420
425
|
if (source instanceof basic_1.DataReference
|
|
421
426
|
|| source instanceof basic_1.VoidType
|
|
427
|
+
|| source instanceof basic_1.DataType
|
|
422
428
|
|| source instanceof basic_1.AnyType
|
|
423
429
|
|| source instanceof basic_1.UnknownType) {
|
|
424
430
|
return true;
|
|
@@ -431,6 +437,7 @@ class TypeUtils {
|
|
|
431
437
|
}
|
|
432
438
|
else if (source instanceof basic_1.VoidType
|
|
433
439
|
|| source instanceof basic_1.AnyType
|
|
440
|
+
|| source instanceof basic_1.DataType
|
|
434
441
|
|| source instanceof basic_1.UnknownType) {
|
|
435
442
|
return true;
|
|
436
443
|
}
|
|
@@ -837,7 +837,7 @@ class BasicTypes {
|
|
|
837
837
|
return new Types.DataReference(found);
|
|
838
838
|
}
|
|
839
839
|
else if (chain.concatTokens().toUpperCase() === "DATA") {
|
|
840
|
-
return new Types.DataReference(new Types.
|
|
840
|
+
return new Types.DataReference(new Types.DataType());
|
|
841
841
|
}
|
|
842
842
|
if (this.scope.isBadiDef(name) === true) {
|
|
843
843
|
return new Types.VoidType(name);
|
|
@@ -42,6 +42,7 @@ class Loop {
|
|
|
42
42
|
}
|
|
43
43
|
else if (!(sourceType instanceof basic_1.TableType)
|
|
44
44
|
&& !(sourceType instanceof basic_1.AnyType)
|
|
45
|
+
&& !(sourceType instanceof basic_1.DataType)
|
|
45
46
|
&& !(sourceType instanceof basic_1.VoidType)
|
|
46
47
|
&& concat.startsWith("LOOP AT GROUP ") === false) {
|
|
47
48
|
throw new Error("Loop, not a table type");
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataReference = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
|
+
const any_type_1 = require("./any_type");
|
|
5
6
|
class DataReference extends _abstract_type_1.AbstractType {
|
|
6
7
|
constructor(type, qualifiedName) {
|
|
7
8
|
super({ qualifiedName: qualifiedName });
|
|
@@ -21,7 +22,9 @@ class DataReference extends _abstract_type_1.AbstractType {
|
|
|
21
22
|
return "REF TO " + this.type.toABAP();
|
|
22
23
|
}
|
|
23
24
|
isGeneric() {
|
|
24
|
-
|
|
25
|
+
if (this.type instanceof any_type_1.AnyType) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
25
28
|
return false;
|
|
26
29
|
}
|
|
27
30
|
containsVoid() {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataType = void 0;
|
|
4
|
+
const _abstract_type_1 = require("./_abstract_type");
|
|
5
|
+
class DataType extends _abstract_type_1.AbstractType {
|
|
6
|
+
toText() {
|
|
7
|
+
return "```data```";
|
|
8
|
+
}
|
|
9
|
+
toABAP() {
|
|
10
|
+
return "data";
|
|
11
|
+
}
|
|
12
|
+
isGeneric() {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
containsVoid() {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
toCDS() {
|
|
19
|
+
return "abap.TODO_DATA";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.DataType = DataType;
|
|
23
|
+
//# sourceMappingURL=data_type.js.map
|
|
@@ -20,6 +20,7 @@ __exportStar(require("./character_type"), exports);
|
|
|
20
20
|
__exportStar(require("./clike_type"), exports);
|
|
21
21
|
__exportStar(require("./csequence_type"), exports);
|
|
22
22
|
__exportStar(require("./data_reference_type"), exports);
|
|
23
|
+
__exportStar(require("./data_type"), exports);
|
|
23
24
|
__exportStar(require("./date_type"), exports);
|
|
24
25
|
__exportStar(require("./decfloat_type"), exports);
|
|
25
26
|
__exportStar(require("./decfloat16_type"), exports);
|
package/build/src/ddic.js
CHANGED
|
@@ -68,7 +68,7 @@ class DDIC {
|
|
|
68
68
|
case "TABLE":
|
|
69
69
|
return new Types.TableType(new Types.AnyType(), { withHeader: false, keyType: Types.TableKeyType.default });
|
|
70
70
|
case "DATA":
|
|
71
|
-
return new Types.
|
|
71
|
+
return new Types.DataType({ qualifiedName: qualifiedName });
|
|
72
72
|
case "NUMERIC":
|
|
73
73
|
return new Types.NumericGenericType({ qualifiedName: qualifiedName });
|
|
74
74
|
case "UTCLONG": // todo, take version into account
|
|
@@ -126,7 +126,7 @@ class TableType extends _abstract_object_1.AbstractObject {
|
|
|
126
126
|
type = new Types.TableType(new basic_1.GenericObjectReferenceType(), tableOptions, this.getName());
|
|
127
127
|
}
|
|
128
128
|
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype === "DATA") {
|
|
129
|
-
type = new Types.TableType(new basic_1.DataReference(new
|
|
129
|
+
type = new Types.TableType(new basic_1.DataReference(new Types.DataType()), tableOptions, this.getName());
|
|
130
130
|
}
|
|
131
131
|
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype !== undefined) {
|
|
132
132
|
const lookup = ddic.lookupObject(this.parsedXML.rowtype);
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.105.
|
|
3
|
+
"version": "2.105.20",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.40.
|
|
53
|
+
"@microsoft/api-extractor": "^7.40.3",
|
|
54
54
|
"@types/chai": "^4.3.11",
|
|
55
55
|
"@types/mocha": "^10.0.6",
|
|
56
56
|
"@types/node": "^20.11.19",
|