@abaplint/cli 2.113.181 → 2.113.183
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 +68 -34
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -15999,7 +15999,7 @@ class Raise {
|
|
|
15999
15999
|
const exporting = (0, combi_1.seq)("EXPORTING", expressions_1.ParameterListS);
|
|
16000
16000
|
const from = (0, combi_1.seq)("TYPE", expressions_1.ClassName, (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v750, (0, combi_1.alt)(mess, messid)), (0, combi_1.ver)(version_1.Version.v752, "USING MESSAGE"))), (0, combi_1.optPrio)(exporting));
|
|
16001
16001
|
const pre = (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("RESUMABLE"), "EXCEPTION"), "SHORTDUMP");
|
|
16002
|
-
const clas = (0, combi_1.seq)(pre, (0, combi_1.altPrio)(from, (0, combi_1.ver)(version_1.Version.v752, expressions_1.Source), expressions_1.SimpleSource2));
|
|
16002
|
+
const clas = (0, combi_1.seq)(pre, (0, combi_1.altPrio)(from, (0, combi_1.ver)(version_1.Version.v752, expressions_1.Source, version_1.Version.OpenABAP), expressions_1.SimpleSource2));
|
|
16003
16003
|
const ret = (0, combi_1.seq)("RAISE", (0, combi_1.altPrio)(clas, expressions_1.ExceptionName));
|
|
16004
16004
|
return ret;
|
|
16005
16005
|
}
|
|
@@ -26907,7 +26907,6 @@ class MethodCallParam {
|
|
|
26907
26907
|
new method_parameters_1.MethodParameters().runSyntax(child, input, method);
|
|
26908
26908
|
}
|
|
26909
26909
|
else {
|
|
26910
|
-
// console.dir(child);
|
|
26911
26910
|
const message = "MethodCallParam, unexpected child";
|
|
26912
26911
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
26913
26912
|
return;
|
|
@@ -27234,9 +27233,13 @@ class MethodParameters {
|
|
|
27234
27233
|
for (const i of method.getParameters().getImporting()) {
|
|
27235
27234
|
if (i.getName().toUpperCase() === name) {
|
|
27236
27235
|
targetType = i.getType();
|
|
27236
|
+
break;
|
|
27237
27237
|
}
|
|
27238
27238
|
}
|
|
27239
27239
|
}
|
|
27240
|
+
else {
|
|
27241
|
+
targetType = method;
|
|
27242
|
+
}
|
|
27240
27243
|
let sourceType = source_1.Source.runSyntax(source, input, targetType);
|
|
27241
27244
|
if (sourceType === undefined) {
|
|
27242
27245
|
if (method instanceof basic_1.VoidType) {
|
|
@@ -32257,15 +32260,22 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
32257
32260
|
const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
32258
32261
|
class IncludeType {
|
|
32259
32262
|
runSyntax(node, input) {
|
|
32260
|
-
var _a, _b;
|
|
32263
|
+
var _a, _b, _c;
|
|
32261
32264
|
const components = [];
|
|
32262
32265
|
const iname = node.findFirstExpression(Expressions.TypeName);
|
|
32263
32266
|
if (iname === undefined) {
|
|
32264
32267
|
throw new assert_error_1.AssertError("IncludeType, unexpected node structure");
|
|
32265
32268
|
}
|
|
32266
32269
|
const name = iname.getFirstToken().getStr();
|
|
32270
|
+
const isStructure = node.findDirectTokenByText("STRUCTURE") !== undefined;
|
|
32267
32271
|
let ityp = new basic_types_1.BasicTypes(input).parseType(iname);
|
|
32268
|
-
|
|
32272
|
+
if (ityp instanceof basic_1.VoidType && isStructure) {
|
|
32273
|
+
const found = (_a = input.scope.findVariable(name)) === null || _a === void 0 ? void 0 : _a.getType();
|
|
32274
|
+
if (found) {
|
|
32275
|
+
ityp = found;
|
|
32276
|
+
}
|
|
32277
|
+
}
|
|
32278
|
+
const as = (_b = node.findExpressionAfterToken("AS")) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
32269
32279
|
if (as && ityp instanceof basic_1.StructureType) {
|
|
32270
32280
|
ityp = new basic_1.StructureType(ityp.getComponents().concat([{
|
|
32271
32281
|
name: as,
|
|
@@ -32273,7 +32283,18 @@ class IncludeType {
|
|
|
32273
32283
|
asInclude: true,
|
|
32274
32284
|
}]));
|
|
32275
32285
|
}
|
|
32276
|
-
|
|
32286
|
+
else if (ityp instanceof basic_1.TableType && isStructure) {
|
|
32287
|
+
ityp = ityp.getRowType();
|
|
32288
|
+
}
|
|
32289
|
+
else if (ityp instanceof basic_1.VoidType) {
|
|
32290
|
+
return ityp;
|
|
32291
|
+
}
|
|
32292
|
+
if (!(ityp instanceof basic_1.StructureType)) {
|
|
32293
|
+
const message = "not structured, " + name;
|
|
32294
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
|
|
32295
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
32296
|
+
}
|
|
32297
|
+
const suffix = (_c = node.findExpressionAfterToken("SUFFIX")) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
32277
32298
|
if (suffix && ityp instanceof basic_1.StructureType) {
|
|
32278
32299
|
const components = [];
|
|
32279
32300
|
for (const c of ityp.getComponents()) {
|
|
@@ -35233,9 +35254,7 @@ exports.Constants = Constants;
|
|
|
35233
35254
|
|
|
35234
35255
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
35235
35256
|
exports.Data = void 0;
|
|
35236
|
-
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
35237
35257
|
const data_1 = __webpack_require__(/*! ../statements/data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js");
|
|
35238
|
-
const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
35239
35258
|
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
35240
35259
|
const type_1 = __webpack_require__(/*! ../statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
|
|
35241
35260
|
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
@@ -35244,9 +35263,10 @@ const Basic = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abap
|
|
|
35244
35263
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
35245
35264
|
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
35246
35265
|
const Structures = __webpack_require__(/*! ../../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
35266
|
+
const include_type_1 = __webpack_require__(/*! ../statements/include_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/include_type.js");
|
|
35247
35267
|
class Data {
|
|
35248
35268
|
static runSyntax(node, input) {
|
|
35249
|
-
var _a
|
|
35269
|
+
var _a;
|
|
35250
35270
|
const fouth = (_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.getChildren()[3];
|
|
35251
35271
|
const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens() === "COMMON";
|
|
35252
35272
|
if (isCommonPart) {
|
|
@@ -35281,25 +35301,47 @@ class Data {
|
|
|
35281
35301
|
}
|
|
35282
35302
|
else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.IncludeType) {
|
|
35283
35303
|
// INCLUDES
|
|
35284
|
-
|
|
35285
|
-
const
|
|
35304
|
+
/*
|
|
35305
|
+
const typeToken = c.findFirstExpression(Expressions.TypeName)?.getFirstToken();
|
|
35306
|
+
const typeName = typeToken?.getStr();
|
|
35307
|
+
|
|
35286
35308
|
let foundId = input.scope.findType(typeName);
|
|
35287
35309
|
if (foundId === undefined) {
|
|
35288
|
-
|
|
35310
|
+
foundId = input.scope.findVariable(typeName);
|
|
35289
35311
|
}
|
|
35290
|
-
|
|
35312
|
+
|
|
35313
|
+
let found = foundId?.getType();
|
|
35291
35314
|
if (found === undefined) {
|
|
35292
|
-
|
|
35293
|
-
|
|
35294
|
-
|
|
35295
|
-
|
|
35296
|
-
|
|
35297
|
-
|
|
35298
|
-
|
|
35315
|
+
const f = input.scope.getDDIC().lookupTableOrView(typeName).type;
|
|
35316
|
+
if (f instanceof TypedIdentifier) {
|
|
35317
|
+
found = f.getType();
|
|
35318
|
+
} else {
|
|
35319
|
+
found = f;
|
|
35320
|
+
}
|
|
35321
|
+
} else {
|
|
35322
|
+
input.scope.addReference(typeToken, foundId, ReferenceType.TypeReference, input.filename);
|
|
35299
35323
|
}
|
|
35300
|
-
|
|
35301
|
-
|
|
35324
|
+
if (found instanceof Basic.VoidType) {
|
|
35325
|
+
if (table === true) {
|
|
35326
|
+
const ttyp = new Basic.TableType(found, {withHeader: true, keyType: Basic.TableKeyType.default});
|
|
35327
|
+
return new TypedIdentifier(name, input.filename, ttyp);
|
|
35328
|
+
} else {
|
|
35329
|
+
return new TypedIdentifier(name, input.filename, found);
|
|
35330
|
+
}
|
|
35331
|
+
}
|
|
35332
|
+
if (found instanceof Basic.UnknownType) {
|
|
35333
|
+
return new TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
|
|
35302
35334
|
}
|
|
35335
|
+
if (found instanceof Basic.TableType && found.isWithHeader()) {
|
|
35336
|
+
found = found.getRowType();
|
|
35337
|
+
}
|
|
35338
|
+
if (!(found instanceof Basic.StructureType)) {
|
|
35339
|
+
const message = "not structured, " + typeName;
|
|
35340
|
+
input.issues.push(syntaxIssue(input, typeToken!, message));
|
|
35341
|
+
return new TypedIdentifier(name, input.filename, Basic.VoidType.get(CheckSyntaxKey));
|
|
35342
|
+
}
|
|
35343
|
+
*/
|
|
35344
|
+
const found = new include_type_1.IncludeType().runSyntax(c, input);
|
|
35303
35345
|
if (found instanceof Basic.VoidType) {
|
|
35304
35346
|
if (table === true) {
|
|
35305
35347
|
const ttyp = new Basic.TableType(found, { withHeader: true, keyType: Basic.TableKeyType.default });
|
|
@@ -35309,18 +35351,7 @@ class Data {
|
|
|
35309
35351
|
return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
|
|
35310
35352
|
}
|
|
35311
35353
|
}
|
|
35312
|
-
|
|
35313
|
-
return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
|
|
35314
|
-
}
|
|
35315
|
-
if (found instanceof Basic.TableType && found.isWithHeader()) {
|
|
35316
|
-
found = found.getRowType();
|
|
35317
|
-
}
|
|
35318
|
-
if (!(found instanceof Basic.StructureType)) {
|
|
35319
|
-
const message = "not structured, " + typeName;
|
|
35320
|
-
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, typeToken, message));
|
|
35321
|
-
return new _typed_identifier_1.TypedIdentifier(name, input.filename, Basic.VoidType.get(_syntax_input_1.CheckSyntaxKey));
|
|
35322
|
-
}
|
|
35323
|
-
for (const c of found.getComponents()) {
|
|
35354
|
+
for (const c of found) {
|
|
35324
35355
|
components.push(c);
|
|
35325
35356
|
}
|
|
35326
35357
|
}
|
|
@@ -54895,7 +54926,7 @@ class Registry {
|
|
|
54895
54926
|
}
|
|
54896
54927
|
static abaplintVersion() {
|
|
54897
54928
|
// magic, see build script "version.sh"
|
|
54898
|
-
return "2.113.
|
|
54929
|
+
return "2.113.183";
|
|
54899
54930
|
}
|
|
54900
54931
|
getDDICReferences() {
|
|
54901
54932
|
return this.ddicReferences;
|
|
@@ -62840,6 +62871,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
62840
62871
|
}
|
|
62841
62872
|
replaceLineFunctions(node, lowFile, highSyntax, highFile) {
|
|
62842
62873
|
var _a, _b;
|
|
62874
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
62875
|
+
return undefined;
|
|
62876
|
+
}
|
|
62843
62877
|
const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
|
|
62844
62878
|
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
62845
62879
|
if (r.referenceType !== _reference_1.ReferenceType.BuiltinMethodReference) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.183",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.113.
|
|
41
|
+
"@abaplint/core": "^2.113.183",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|