@abaplint/core 2.105.19 → 2.105.21
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 +9 -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/expressions/new_object.js +1 -1
- package/build/src/abap/5_syntax/statements/create_object.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/build/src/rules/keep_single_parameter_on_one_line.js +5 -0
- 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;
|
|
@@ -26,6 +26,7 @@ class TypeUtils {
|
|
|
26
26
|
}
|
|
27
27
|
else if (type instanceof basic_1.StringType
|
|
28
28
|
|| type instanceof basic_1.AnyType
|
|
29
|
+
|| type instanceof basic_1.DataType
|
|
29
30
|
|| type instanceof basic_1.CharacterType
|
|
30
31
|
|| type instanceof basic_1.SimpleType
|
|
31
32
|
|| type instanceof cgeneric_type_1.CGenericType
|
|
@@ -74,6 +75,7 @@ class TypeUtils {
|
|
|
74
75
|
|| type instanceof basic_1.CSequenceType
|
|
75
76
|
|| type instanceof cgeneric_type_1.CGenericType
|
|
76
77
|
|| type instanceof basic_1.DateType
|
|
78
|
+
|| type instanceof basic_1.DataType
|
|
77
79
|
|| type instanceof basic_1.CLikeType
|
|
78
80
|
|| type instanceof basic_1.PackedType
|
|
79
81
|
|| type instanceof basic_1.TimeType) {
|
|
@@ -304,7 +306,9 @@ class TypeUtils {
|
|
|
304
306
|
else if (target instanceof basic_1.CLikeType) {
|
|
305
307
|
return this.isCharLikeStrict(source);
|
|
306
308
|
}
|
|
307
|
-
else if (target instanceof basic_1.VoidType
|
|
309
|
+
else if (target instanceof basic_1.VoidType
|
|
310
|
+
|| target instanceof basic_1.AnyType
|
|
311
|
+
|| target instanceof basic_1.DataType) {
|
|
308
312
|
return true;
|
|
309
313
|
}
|
|
310
314
|
return false;
|
|
@@ -366,6 +370,7 @@ class TypeUtils {
|
|
|
366
370
|
}
|
|
367
371
|
if (source instanceof basic_1.VoidType
|
|
368
372
|
|| source instanceof basic_1.AnyType
|
|
373
|
+
|| source instanceof basic_1.DataType
|
|
369
374
|
|| source instanceof basic_1.UnknownType) {
|
|
370
375
|
return true;
|
|
371
376
|
}
|
|
@@ -410,6 +415,7 @@ class TypeUtils {
|
|
|
410
415
|
if (source instanceof basic_1.ObjectReferenceType
|
|
411
416
|
|| source instanceof basic_1.GenericObjectReferenceType
|
|
412
417
|
|| source instanceof basic_1.VoidType
|
|
418
|
+
|| source instanceof basic_1.DataType
|
|
413
419
|
|| source instanceof basic_1.AnyType
|
|
414
420
|
|| source instanceof basic_1.UnknownType) {
|
|
415
421
|
return true;
|
|
@@ -419,6 +425,7 @@ class TypeUtils {
|
|
|
419
425
|
else if (target instanceof basic_1.DataReference) {
|
|
420
426
|
if (source instanceof basic_1.DataReference
|
|
421
427
|
|| source instanceof basic_1.VoidType
|
|
428
|
+
|| source instanceof basic_1.DataType
|
|
422
429
|
|| source instanceof basic_1.AnyType
|
|
423
430
|
|| source instanceof basic_1.UnknownType) {
|
|
424
431
|
return true;
|
|
@@ -431,6 +438,7 @@ class TypeUtils {
|
|
|
431
438
|
}
|
|
432
439
|
else if (source instanceof basic_1.VoidType
|
|
433
440
|
|| source instanceof basic_1.AnyType
|
|
441
|
+
|| source instanceof basic_1.DataType
|
|
434
442
|
|| source instanceof basic_1.UnknownType) {
|
|
435
443
|
return true;
|
|
436
444
|
}
|
|
@@ -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);
|
|
@@ -109,7 +109,7 @@ class NewObject {
|
|
|
109
109
|
new method_parameters_1.MethodParameters().checkExporting(parameters, scope, method, filename);
|
|
110
110
|
}
|
|
111
111
|
else if (requiredParameters.length > 0) {
|
|
112
|
-
throw new Error(`constructor parameter "${requiredParameters[0].getName()}" must be supplied` + name);
|
|
112
|
+
throw new Error(`constructor parameter "${requiredParameters[0].getName()}" must be supplied, ` + name);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
defaultImportingType(method) {
|
|
@@ -49,6 +49,7 @@ class CreateObject {
|
|
|
49
49
|
}
|
|
50
50
|
else if (!(found instanceof basic_1.ObjectReferenceType)
|
|
51
51
|
&& !(found instanceof basic_1.AnyType)
|
|
52
|
+
&& !(found instanceof basic_1.DataType)
|
|
52
53
|
&& !(found instanceof basic_1.GenericObjectReferenceType)) {
|
|
53
54
|
throw new Error("Target must be an object reference, " + t.concatTokens());
|
|
54
55
|
}
|
|
@@ -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
|
@@ -126,6 +126,11 @@ class KeepSingleParameterCallsOnOneLine extends _abap_rule_1.ABAPRule {
|
|
|
126
126
|
}
|
|
127
127
|
isSingleParameter(c) {
|
|
128
128
|
if (c.findDirectExpression(Expressions.Source)) {
|
|
129
|
+
for (const params of c.findAllExpressions(Expressions.ParameterListS)) {
|
|
130
|
+
if (params.getChildren().length > 1) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
129
134
|
return true;
|
|
130
135
|
}
|
|
131
136
|
const list = c.findDirectExpression(Expressions.ParameterListS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.105.
|
|
3
|
+
"version": "2.105.21",
|
|
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.6",
|
|
54
54
|
"@types/chai": "^4.3.11",
|
|
55
55
|
"@types/mocha": "^10.0.6",
|
|
56
56
|
"@types/node": "^20.11.19",
|