@abaplint/cli 2.105.20 → 2.105.22
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/cli.js +32 -5
- package/package.json +6 -6
package/build/cli.js
CHANGED
|
@@ -22318,6 +22318,7 @@ class TypeUtils {
|
|
|
22318
22318
|
}
|
|
22319
22319
|
else if (type instanceof basic_1.StringType
|
|
22320
22320
|
|| type instanceof basic_1.AnyType
|
|
22321
|
+
|| type instanceof basic_1.DataType
|
|
22321
22322
|
|| type instanceof basic_1.CharacterType
|
|
22322
22323
|
|| type instanceof basic_1.SimpleType
|
|
22323
22324
|
|| type instanceof cgeneric_type_1.CGenericType
|
|
@@ -26274,7 +26275,7 @@ class NewObject {
|
|
|
26274
26275
|
new method_parameters_1.MethodParameters().checkExporting(parameters, scope, method, filename);
|
|
26275
26276
|
}
|
|
26276
26277
|
else if (requiredParameters.length > 0) {
|
|
26277
|
-
throw new Error(`constructor parameter "${requiredParameters[0].getName()}" must be supplied` + name);
|
|
26278
|
+
throw new Error(`constructor parameter "${requiredParameters[0].getName()}" must be supplied, ` + name);
|
|
26278
26279
|
}
|
|
26279
26280
|
}
|
|
26280
26281
|
defaultImportingType(method) {
|
|
@@ -29395,6 +29396,7 @@ class CreateObject {
|
|
|
29395
29396
|
}
|
|
29396
29397
|
else if (!(found instanceof basic_1.ObjectReferenceType)
|
|
29397
29398
|
&& !(found instanceof basic_1.AnyType)
|
|
29399
|
+
&& !(found instanceof basic_1.DataType)
|
|
29398
29400
|
&& !(found instanceof basic_1.GenericObjectReferenceType)) {
|
|
29399
29401
|
throw new Error("Target must be an object reference, " + t.concatTokens());
|
|
29400
29402
|
}
|
|
@@ -30195,7 +30197,11 @@ class GetReference {
|
|
|
30195
30197
|
const type = new source_1.Source().runSyntax(s, scope, filename);
|
|
30196
30198
|
const target = node.findDirectExpression(Expressions.Target);
|
|
30197
30199
|
const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
|
|
30200
|
+
// todo: error if inline field symbol
|
|
30198
30201
|
if (inline) {
|
|
30202
|
+
if (type instanceof basic_1.AnyType) {
|
|
30203
|
+
throw new Error("GET REFERENCE generic and inline declaration not possible");
|
|
30204
|
+
}
|
|
30199
30205
|
new inline_data_1.InlineData().runSyntax(inline, scope, filename, type ? new basic_1.DataReference(type) : undefined);
|
|
30200
30206
|
}
|
|
30201
30207
|
else if (target) {
|
|
@@ -32978,7 +32984,10 @@ const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@a
|
|
|
32978
32984
|
class Write {
|
|
32979
32985
|
runSyntax(node, scope, filename) {
|
|
32980
32986
|
// todo, more
|
|
32981
|
-
|
|
32987
|
+
let second = node.getChildren()[1];
|
|
32988
|
+
if (second.get() instanceof Expressions.WriteOffsetLength) {
|
|
32989
|
+
second = node.getChildren()[2];
|
|
32990
|
+
}
|
|
32982
32991
|
for (const s of node.findAllExpressions(Expressions.Source)) {
|
|
32983
32992
|
const type = new source_1.Source().runSyntax(s, scope, filename);
|
|
32984
32993
|
if (s === second
|
|
@@ -51295,7 +51304,7 @@ class Registry {
|
|
|
51295
51304
|
}
|
|
51296
51305
|
static abaplintVersion() {
|
|
51297
51306
|
// magic, see build script "version.sh"
|
|
51298
|
-
return "2.105.
|
|
51307
|
+
return "2.105.22";
|
|
51299
51308
|
}
|
|
51300
51309
|
getDDICReferences() {
|
|
51301
51310
|
return this.ddicReferences;
|
|
@@ -57213,7 +57222,7 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
|
|
|
57213
57222
|
return undefined;
|
|
57214
57223
|
}
|
|
57215
57224
|
downportRefSimple(high, lowFile, highSyntax) {
|
|
57216
|
-
var _a;
|
|
57225
|
+
var _a, _b;
|
|
57217
57226
|
if (!(high.get() instanceof Statements.Move)
|
|
57218
57227
|
|| high.getChildren().length !== 4
|
|
57219
57228
|
|| high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== "REF") {
|
|
@@ -57238,7 +57247,20 @@ ENDIF.
|
|
|
57238
57247
|
GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
|
|
57239
57248
|
}
|
|
57240
57249
|
else {
|
|
57241
|
-
|
|
57250
|
+
const concat = target.concatTokens();
|
|
57251
|
+
code = `GET REFERENCE OF ${sourceRef.concatTokens()} INTO ${concat}`;
|
|
57252
|
+
// workaround for handling generic ANY type,
|
|
57253
|
+
if (concat.toUpperCase().startsWith("DATA(")) {
|
|
57254
|
+
const spag = highSyntax.spaghetti.lookupPosition(high.getFirstToken().getStart(), lowFile.getFilename());
|
|
57255
|
+
if (spag !== undefined) {
|
|
57256
|
+
const found = spag.findVariable(sourceRef.concatTokens());
|
|
57257
|
+
const tt = found === null || found === void 0 ? void 0 : found.getType();
|
|
57258
|
+
if (tt instanceof basic_1.AnyType) {
|
|
57259
|
+
const tname = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
57260
|
+
code = `DATA ${tname} TYPE REF TO data.\nGET REFERENCE OF ${sourceRef.concatTokens()} INTO ${tname}`;
|
|
57261
|
+
}
|
|
57262
|
+
}
|
|
57263
|
+
}
|
|
57242
57264
|
}
|
|
57243
57265
|
const start = high.getFirstToken().getStart();
|
|
57244
57266
|
const end = high.getLastToken().getStart();
|
|
@@ -62098,6 +62120,11 @@ class KeepSingleParameterCallsOnOneLine extends _abap_rule_1.ABAPRule {
|
|
|
62098
62120
|
}
|
|
62099
62121
|
isSingleParameter(c) {
|
|
62100
62122
|
if (c.findDirectExpression(Expressions.Source)) {
|
|
62123
|
+
for (const params of c.findAllExpressions(Expressions.ParameterListS)) {
|
|
62124
|
+
if (params.getChildren().length > 1) {
|
|
62125
|
+
return false;
|
|
62126
|
+
}
|
|
62127
|
+
}
|
|
62101
62128
|
return true;
|
|
62102
62129
|
}
|
|
62103
62130
|
const list = c.findDirectExpression(Expressions.ParameterListS);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.105.
|
|
3
|
+
"version": "2.105.22",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.105.
|
|
42
|
-
"@types/chai": "^4.3.
|
|
41
|
+
"@abaplint/core": "^2.105.22",
|
|
42
|
+
"@types/chai": "^4.3.12",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.6",
|
|
46
|
-
"@types/node": "^20.11.
|
|
46
|
+
"@types/node": "^20.11.20",
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.4.1",
|
|
49
49
|
"chalk": "^5.3.0",
|
|
50
|
-
"eslint": "^8.
|
|
50
|
+
"eslint": "^8.57.0",
|
|
51
51
|
"glob": "^7.2.3",
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
|
-
"memfs": "^4.7.
|
|
53
|
+
"memfs": "^4.7.7",
|
|
54
54
|
"minimist": "^1.2.8",
|
|
55
55
|
"mocha": "^10.3.0",
|
|
56
56
|
"progress": "^2.0.3",
|