@abaplint/core 2.82.10 → 2.82.11
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 +8 -0
- package/build/src/abap/types/basic/decfloat_type.js +20 -0
- package/build/src/abap/types/basic/index.js +1 -0
- package/build/src/ddic.js +2 -0
- package/build/src/objects/table_type.js +3 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/unknown_types.js +28 -3
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -324,6 +324,7 @@ declare namespace BasicTypes {
|
|
|
324
324
|
CSequenceType,
|
|
325
325
|
DataReference,
|
|
326
326
|
DateType,
|
|
327
|
+
DecFloatType,
|
|
327
328
|
DecFloat16Type,
|
|
328
329
|
DecFloat34Type,
|
|
329
330
|
FloatType,
|
|
@@ -1241,6 +1242,13 @@ declare class DecFloat34Type extends AbstractType {
|
|
|
1241
1242
|
containsVoid(): boolean;
|
|
1242
1243
|
}
|
|
1243
1244
|
|
|
1245
|
+
declare class DecFloatType extends AbstractType {
|
|
1246
|
+
toText(): string;
|
|
1247
|
+
isGeneric(): boolean;
|
|
1248
|
+
toABAP(): string;
|
|
1249
|
+
containsVoid(): boolean;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1244
1252
|
declare class Decimals extends Expression {
|
|
1245
1253
|
getRunnable(): IStatementRunnable;
|
|
1246
1254
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DecFloatType = void 0;
|
|
4
|
+
const _abstract_type_1 = require("./_abstract_type");
|
|
5
|
+
class DecFloatType extends _abstract_type_1.AbstractType {
|
|
6
|
+
toText() {
|
|
7
|
+
return "```decfloat```";
|
|
8
|
+
}
|
|
9
|
+
isGeneric() {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
toABAP() {
|
|
13
|
+
return "decfloat";
|
|
14
|
+
}
|
|
15
|
+
containsVoid() {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.DecFloatType = DecFloatType;
|
|
20
|
+
//# sourceMappingURL=decfloat_type.js.map
|
|
@@ -16,6 +16,7 @@ __exportStar(require("./clike_type"), exports);
|
|
|
16
16
|
__exportStar(require("./csequence_type"), exports);
|
|
17
17
|
__exportStar(require("./data_reference_type"), exports);
|
|
18
18
|
__exportStar(require("./date_type"), exports);
|
|
19
|
+
__exportStar(require("./decfloat_type"), exports);
|
|
19
20
|
__exportStar(require("./decfloat16_type"), exports);
|
|
20
21
|
__exportStar(require("./decfloat34_type"), exports);
|
|
21
22
|
__exportStar(require("./float_type"), exports);
|
package/build/src/ddic.js
CHANGED
|
@@ -59,6 +59,9 @@ class TableType extends _abstract_object_1.AbstractObject {
|
|
|
59
59
|
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype === "OBJECT") {
|
|
60
60
|
type = new Types.TableType(new basic_1.GenericObjectReferenceType(), { withHeader: false }, this.getName());
|
|
61
61
|
}
|
|
62
|
+
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype === "DATA") {
|
|
63
|
+
type = new Types.TableType(new basic_1.DataReference(new basic_1.AnyType()), { withHeader: false }, this.getName());
|
|
64
|
+
}
|
|
62
65
|
else if (this.parsedXML.rowkind === "R" && this.parsedXML.rowtype !== undefined) {
|
|
63
66
|
const lookup = ddic.lookupObject(this.parsedXML.rowtype);
|
|
64
67
|
type = new Types.TableType(lookup.type, { withHeader: false }, this.getName());
|
package/build/src/registry.js
CHANGED
|
@@ -40,9 +40,27 @@ class UnknownTypes {
|
|
|
40
40
|
return [];
|
|
41
41
|
}
|
|
42
42
|
const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;
|
|
43
|
-
|
|
43
|
+
const found = this.traverse(spaghetti.getTop());
|
|
44
|
+
return this.removeDuplicates(found);
|
|
44
45
|
}
|
|
45
46
|
/////////////////////
|
|
47
|
+
removeDuplicates(list) {
|
|
48
|
+
const deduplicated = [];
|
|
49
|
+
for (const result of list) {
|
|
50
|
+
let cont = false;
|
|
51
|
+
for (const d of deduplicated) {
|
|
52
|
+
if (result.getStart().equals(d.getStart())) {
|
|
53
|
+
cont = true;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (cont === true) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
deduplicated.push(result);
|
|
61
|
+
}
|
|
62
|
+
return deduplicated;
|
|
63
|
+
}
|
|
46
64
|
traverse(node) {
|
|
47
65
|
var _a;
|
|
48
66
|
const ret = [];
|
|
@@ -73,7 +91,14 @@ class UnknownTypes {
|
|
|
73
91
|
}
|
|
74
92
|
}
|
|
75
93
|
for (const v of node.getData().idefs) {
|
|
76
|
-
const found = this.
|
|
94
|
+
const found = this.checkMethodParameters(v);
|
|
95
|
+
if (found) {
|
|
96
|
+
const message = "Contains unknown, " + found.found;
|
|
97
|
+
ret.push(issue_1.Issue.atIdentifier(found.id, message, this.getMetadata().key, this.conf.severity));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
for (const v of node.getData().cdefs) {
|
|
101
|
+
const found = this.checkMethodParameters(v);
|
|
77
102
|
if (found) {
|
|
78
103
|
const message = "Contains unknown, " + found.found;
|
|
79
104
|
ret.push(issue_1.Issue.atIdentifier(found.id, message, this.getMetadata().key, this.conf.severity));
|
|
@@ -84,7 +109,7 @@ class UnknownTypes {
|
|
|
84
109
|
}
|
|
85
110
|
return ret;
|
|
86
111
|
}
|
|
87
|
-
|
|
112
|
+
checkMethodParameters(idef) {
|
|
88
113
|
var _a;
|
|
89
114
|
for (const m of ((_a = idef.getMethodDefinitions()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
|
|
90
115
|
for (const p of m.getParameters().getAll()) {
|