@abaplint/core 2.102.24 → 2.102.26
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.
|
@@ -253,7 +253,7 @@ class CurrentScope {
|
|
|
253
253
|
return undefined;
|
|
254
254
|
}
|
|
255
255
|
const typePoolName = name.split("_")[0];
|
|
256
|
-
if (typePoolName.length <=
|
|
256
|
+
if (typePoolName.length <= 1 || typePoolName.length > 5) {
|
|
257
257
|
return undefined;
|
|
258
258
|
}
|
|
259
259
|
const typePool = this.reg.getObject("TYPE", typePoolName);
|
|
@@ -10,6 +10,9 @@ class InlineData {
|
|
|
10
10
|
var _a;
|
|
11
11
|
const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
12
12
|
if (token && type) {
|
|
13
|
+
if (type instanceof basic_1.CSequenceType) {
|
|
14
|
+
type = basic_1.StringType.get();
|
|
15
|
+
}
|
|
13
16
|
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
14
17
|
scope.addIdentifier(identifier);
|
|
15
18
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
@@ -13,7 +13,7 @@ class Data {
|
|
|
13
13
|
const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
|
|
14
14
|
if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
|
|
15
15
|
&& (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
|
|
16
|
-
throw new Error("DATA definition cannot be generic, " + name);
|
|
16
|
+
throw new Error("DATA definition cannot be generic, " + (name === null || name === void 0 ? void 0 : name.concatTokens()));
|
|
17
17
|
}
|
|
18
18
|
return id;
|
|
19
19
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -288,7 +288,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(
|
|
291
|
+
if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(")) {
|
|
292
292
|
for (let i = 0; i < lowStatements.length; i++) {
|
|
293
293
|
const high = highStatements[i];
|
|
294
294
|
const issue = this.replaceXsdBool(high, lowFile, highSyntax);
|
|
@@ -472,7 +472,7 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
472
472
|
if (found) {
|
|
473
473
|
return found;
|
|
474
474
|
}
|
|
475
|
-
found = this.outlineDataSimple(high, lowFile);
|
|
475
|
+
found = this.outlineDataSimple(high, lowFile, highSyntax);
|
|
476
476
|
if (found) {
|
|
477
477
|
return found;
|
|
478
478
|
}
|
|
@@ -1016,8 +1016,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
1016
1016
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
1017
1017
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
1018
1018
|
}
|
|
1019
|
-
outlineDataSimple(node, lowFile) {
|
|
1020
|
-
// outlines "DATA(ls_msg) = temp1.", note that this does not need to look at types
|
|
1019
|
+
outlineDataSimple(node, lowFile, highSyntax) {
|
|
1021
1020
|
var _a, _b, _c;
|
|
1022
1021
|
if (!(node.get() instanceof Statements.Move)) {
|
|
1023
1022
|
return undefined;
|
|
@@ -1056,6 +1055,13 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
1056
1055
|
}
|
|
1057
1056
|
}
|
|
1058
1057
|
else {
|
|
1058
|
+
const spag = highSyntax.spaghetti.lookupPosition(source.getFirstToken().getStart(), lowFile.getFilename());
|
|
1059
|
+
if (spag) {
|
|
1060
|
+
const found = spag.findVariable(source.concatTokens());
|
|
1061
|
+
if (found && found.getType().isGeneric() === true) {
|
|
1062
|
+
return undefined;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1059
1065
|
type = source.concatTokens();
|
|
1060
1066
|
}
|
|
1061
1067
|
const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.26",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.36.4",
|
|
54
54
|
"@types/chai": "^4.3.5",
|
|
55
55
|
"@types/mocha": "^10.0.1",
|
|
56
|
-
"@types/node": "^20.5.
|
|
56
|
+
"@types/node": "^20.5.2",
|
|
57
57
|
"chai": "^4.3.7",
|
|
58
58
|
"eslint": "^8.47.0",
|
|
59
59
|
"mocha": "^10.2.0",
|