@abaplint/core 2.120.12 → 2.120.14
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/src/abap/5_syntax/basic_types.js +1 -1
- package/build/src/abap/5_syntax/expressions/target.js +3 -1
- package/build/src/abap/5_syntax/statements/type.js +1 -1
- package/build/src/abap/5_syntax/statements/write.js +1 -1
- package/build/src/ddic.js +6 -6
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -84,9 +84,11 @@ class Target {
|
|
|
84
84
|
else if (context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof unknown_type_1.UnknownType) {
|
|
85
85
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
86
86
|
}
|
|
87
|
+
else if (context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.VoidType) {
|
|
88
|
+
return context.getRowType();
|
|
89
|
+
}
|
|
87
90
|
else if (!(context instanceof basic_1.StructureType)
|
|
88
91
|
&& !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.StructureType)
|
|
89
|
-
&& !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.VoidType)
|
|
90
92
|
&& !(context instanceof basic_1.VoidType)) {
|
|
91
93
|
const message = "Not a structure, target, " + (context === null || context === void 0 ? void 0 : context.constructor.name) + ", " + current.concatTokens();
|
|
92
94
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
@@ -54,7 +54,7 @@ class Type {
|
|
|
54
54
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
55
55
|
return new _typed_identifier_1.TypedIdentifier(found.getToken(), input.filename, basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey));
|
|
56
56
|
}
|
|
57
|
-
if (input.scope.
|
|
57
|
+
if (input.scope.isAnyOO() && found.getType() instanceof basic_1.PackedType) {
|
|
58
58
|
const concat = node.concatTokens().toUpperCase();
|
|
59
59
|
if ((concat.includes(" TYPE P ") || concat.includes(" TYPE P."))
|
|
60
60
|
&& concat.includes(" DECIMALS ") === false) {
|
|
@@ -70,7 +70,7 @@ class Write {
|
|
|
70
70
|
if (target) {
|
|
71
71
|
const targetType = target_1.Target.runSyntax(target, input);
|
|
72
72
|
if (new _type_utils_1.TypeUtils(input.scope).isCharLikeField(targetType) === false) {
|
|
73
|
-
const message = `"${target.
|
|
73
|
+
const message = `"${target.concatTokens()}" must be a character-like field (data type C, N, D, or T, got "${targetType === null || targetType === void 0 ? void 0 : targetType.constructor.name}")`;
|
|
74
74
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, target.getFirstToken(), message));
|
|
75
75
|
}
|
|
76
76
|
}
|
package/build/src/ddic.js
CHANGED
|
@@ -147,7 +147,7 @@ class DDIC {
|
|
|
147
147
|
return new Types.PackedType(length, 0, { qualifiedName: qualifiedName });
|
|
148
148
|
}
|
|
149
149
|
else {
|
|
150
|
-
return new Types.PackedType(
|
|
150
|
+
return new Types.PackedType(8, 0, { qualifiedName: qualifiedName });
|
|
151
151
|
}
|
|
152
152
|
case "C":
|
|
153
153
|
if (length) {
|
|
@@ -375,14 +375,14 @@ class DDIC {
|
|
|
375
375
|
case "DF16_DEC": // 1 <= len <= 31
|
|
376
376
|
case "DF34_DEC": // 1 <= len <= 31
|
|
377
377
|
case "CURR": // 1 <= len <= 31
|
|
378
|
-
case "QUAN": // 1 <= len <= 31
|
|
378
|
+
case "QUAN": { // 1 <= len <= 31
|
|
379
379
|
if (input.length === undefined) {
|
|
380
380
|
return new Types.UnknownType(input.text + " unknown length, " + input.infoText, input.infoText);
|
|
381
381
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
382
|
+
const packedLength = Math.ceil((parseInt(input.length, 10) + 1) / 2);
|
|
383
|
+
const decimals = input.decimals === undefined ? 0 : parseInt(input.decimals, 10);
|
|
384
|
+
return new Types.PackedType(packedLength, decimals, extra);
|
|
385
|
+
}
|
|
386
386
|
case "ACCP":
|
|
387
387
|
return new Types.CharacterType(6, extra); // YYYYMM
|
|
388
388
|
case "LANG":
|
package/build/src/registry.js
CHANGED