@abaplint/cli 2.113.182 → 2.113.184
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 +92 -38
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -7919,7 +7919,7 @@ class Source extends combi_1.Expression {
|
|
|
7919
7919
|
const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
7920
7920
|
const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
|
|
7921
7921
|
const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
7922
|
-
const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
|
|
7922
|
+
const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
7923
7923
|
const reff = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("REF", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, (0, combi_1.optPrio)("OPTIONAL"), rparen), version_1.Version.OpenABAP);
|
|
7924
7924
|
const exact = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("EXACT", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, rparen, (0, combi_1.optPrio)(after)));
|
|
7925
7925
|
const filter = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("FILTER", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.FilterBody, rparen));
|
|
@@ -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
|
}
|
|
@@ -25955,7 +25955,7 @@ class FieldChain {
|
|
|
25955
25955
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, current.getFirstToken(), message));
|
|
25956
25956
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
25957
25957
|
}
|
|
25958
|
-
table_expression_1.TableExpression.runSyntax(current, input);
|
|
25958
|
+
table_expression_1.TableExpression.runSyntax(current, input, context);
|
|
25959
25959
|
if (!(context instanceof basic_1.VoidType)) {
|
|
25960
25960
|
context = context.getRowType();
|
|
25961
25961
|
}
|
|
@@ -28936,16 +28936,39 @@ exports.SwitchBody = SwitchBody;
|
|
|
28936
28936
|
|
|
28937
28937
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
28938
28938
|
exports.TableExpression = void 0;
|
|
28939
|
+
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
28939
28940
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
28940
28941
|
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
28942
|
+
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
28943
|
+
const component_chain_1 = __webpack_require__(/*! ./component_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/component_chain.js");
|
|
28941
28944
|
class TableExpression {
|
|
28942
|
-
static runSyntax(node, input) {
|
|
28945
|
+
static runSyntax(node, input, rowType) {
|
|
28943
28946
|
if (node === undefined) {
|
|
28944
28947
|
return;
|
|
28945
28948
|
}
|
|
28946
|
-
|
|
28949
|
+
let context = rowType;
|
|
28950
|
+
if (context instanceof basic_1.TableType) {
|
|
28951
|
+
context = context.getRowType();
|
|
28952
|
+
}
|
|
28953
|
+
if (node.getChildren().length === 3) {
|
|
28954
|
+
const s = node.findDirectExpression(Expressions.Source);
|
|
28955
|
+
source_1.Source.runSyntax(s, input, context);
|
|
28956
|
+
}
|
|
28957
|
+
else if (node.findDirectTokenByText("INDEX")) {
|
|
28958
|
+
const s = node.findDirectExpression(Expressions.Source);
|
|
28947
28959
|
source_1.Source.runSyntax(s, input);
|
|
28948
28960
|
}
|
|
28961
|
+
else {
|
|
28962
|
+
let fieldType = undefined;
|
|
28963
|
+
for (const c of node.getChildren()) {
|
|
28964
|
+
if (c instanceof nodes_1.ExpressionNode && c.get() instanceof Expressions.ComponentChainSimple) {
|
|
28965
|
+
fieldType = component_chain_1.ComponentChain.runSyntax(context, c, input);
|
|
28966
|
+
}
|
|
28967
|
+
else if (c instanceof nodes_1.ExpressionNode && c.get() instanceof Expressions.Source) {
|
|
28968
|
+
source_1.Source.runSyntax(c, input, fieldType);
|
|
28969
|
+
}
|
|
28970
|
+
}
|
|
28971
|
+
}
|
|
28949
28972
|
}
|
|
28950
28973
|
}
|
|
28951
28974
|
exports.TableExpression = TableExpression;
|
|
@@ -29063,7 +29086,7 @@ class Target {
|
|
|
29063
29086
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
29064
29087
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
29065
29088
|
}
|
|
29066
|
-
table_expression_1.TableExpression.runSyntax(current, input);
|
|
29089
|
+
table_expression_1.TableExpression.runSyntax(current, input, context);
|
|
29067
29090
|
if (!(context instanceof basic_1.VoidType)) {
|
|
29068
29091
|
context = context.getRowType();
|
|
29069
29092
|
}
|
|
@@ -32260,15 +32283,22 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
32260
32283
|
const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
|
|
32261
32284
|
class IncludeType {
|
|
32262
32285
|
runSyntax(node, input) {
|
|
32263
|
-
var _a, _b;
|
|
32286
|
+
var _a, _b, _c;
|
|
32264
32287
|
const components = [];
|
|
32265
32288
|
const iname = node.findFirstExpression(Expressions.TypeName);
|
|
32266
32289
|
if (iname === undefined) {
|
|
32267
32290
|
throw new assert_error_1.AssertError("IncludeType, unexpected node structure");
|
|
32268
32291
|
}
|
|
32269
32292
|
const name = iname.getFirstToken().getStr();
|
|
32293
|
+
const isStructure = node.findDirectTokenByText("STRUCTURE") !== undefined;
|
|
32270
32294
|
let ityp = new basic_types_1.BasicTypes(input).parseType(iname);
|
|
32271
|
-
|
|
32295
|
+
if (ityp instanceof basic_1.VoidType && isStructure) {
|
|
32296
|
+
const found = (_a = input.scope.findVariable(name)) === null || _a === void 0 ? void 0 : _a.getType();
|
|
32297
|
+
if (found) {
|
|
32298
|
+
ityp = found;
|
|
32299
|
+
}
|
|
32300
|
+
}
|
|
32301
|
+
const as = (_b = node.findExpressionAfterToken("AS")) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
32272
32302
|
if (as && ityp instanceof basic_1.StructureType) {
|
|
32273
32303
|
ityp = new basic_1.StructureType(ityp.getComponents().concat([{
|
|
32274
32304
|
name: as,
|
|
@@ -32276,7 +32306,18 @@ class IncludeType {
|
|
|
32276
32306
|
asInclude: true,
|
|
32277
32307
|
}]));
|
|
32278
32308
|
}
|
|
32279
|
-
|
|
32309
|
+
else if (ityp instanceof basic_1.TableType && isStructure) {
|
|
32310
|
+
ityp = ityp.getRowType();
|
|
32311
|
+
}
|
|
32312
|
+
else if (ityp instanceof basic_1.VoidType) {
|
|
32313
|
+
return ityp;
|
|
32314
|
+
}
|
|
32315
|
+
if (!(ityp instanceof basic_1.StructureType)) {
|
|
32316
|
+
const message = "not structured, " + name;
|
|
32317
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
|
|
32318
|
+
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
32319
|
+
}
|
|
32320
|
+
const suffix = (_c = node.findExpressionAfterToken("SUFFIX")) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
32280
32321
|
if (suffix && ityp instanceof basic_1.StructureType) {
|
|
32281
32322
|
const components = [];
|
|
32282
32323
|
for (const c of ityp.getComponents()) {
|
|
@@ -35236,9 +35277,7 @@ exports.Constants = Constants;
|
|
|
35236
35277
|
|
|
35237
35278
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
35238
35279
|
exports.Data = void 0;
|
|
35239
|
-
const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
|
|
35240
35280
|
const data_1 = __webpack_require__(/*! ../statements/data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/data.js");
|
|
35241
|
-
const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
35242
35281
|
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
35243
35282
|
const type_1 = __webpack_require__(/*! ../statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
|
|
35244
35283
|
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
@@ -35247,9 +35286,10 @@ const Basic = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abap
|
|
|
35247
35286
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
35248
35287
|
const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
35249
35288
|
const Structures = __webpack_require__(/*! ../../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
35289
|
+
const include_type_1 = __webpack_require__(/*! ../statements/include_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/include_type.js");
|
|
35250
35290
|
class Data {
|
|
35251
35291
|
static runSyntax(node, input) {
|
|
35252
|
-
var _a
|
|
35292
|
+
var _a;
|
|
35253
35293
|
const fouth = (_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.getChildren()[3];
|
|
35254
35294
|
const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens() === "COMMON";
|
|
35255
35295
|
if (isCommonPart) {
|
|
@@ -35284,25 +35324,47 @@ class Data {
|
|
|
35284
35324
|
}
|
|
35285
35325
|
else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.IncludeType) {
|
|
35286
35326
|
// INCLUDES
|
|
35287
|
-
|
|
35288
|
-
const
|
|
35327
|
+
/*
|
|
35328
|
+
const typeToken = c.findFirstExpression(Expressions.TypeName)?.getFirstToken();
|
|
35329
|
+
const typeName = typeToken?.getStr();
|
|
35330
|
+
|
|
35289
35331
|
let foundId = input.scope.findType(typeName);
|
|
35290
35332
|
if (foundId === undefined) {
|
|
35291
|
-
|
|
35333
|
+
foundId = input.scope.findVariable(typeName);
|
|
35292
35334
|
}
|
|
35293
|
-
|
|
35335
|
+
|
|
35336
|
+
let found = foundId?.getType();
|
|
35294
35337
|
if (found === undefined) {
|
|
35295
|
-
|
|
35296
|
-
|
|
35297
|
-
|
|
35298
|
-
|
|
35299
|
-
|
|
35300
|
-
|
|
35301
|
-
|
|
35338
|
+
const f = input.scope.getDDIC().lookupTableOrView(typeName).type;
|
|
35339
|
+
if (f instanceof TypedIdentifier) {
|
|
35340
|
+
found = f.getType();
|
|
35341
|
+
} else {
|
|
35342
|
+
found = f;
|
|
35343
|
+
}
|
|
35344
|
+
} else {
|
|
35345
|
+
input.scope.addReference(typeToken, foundId, ReferenceType.TypeReference, input.filename);
|
|
35302
35346
|
}
|
|
35303
|
-
|
|
35304
|
-
|
|
35347
|
+
if (found instanceof Basic.VoidType) {
|
|
35348
|
+
if (table === true) {
|
|
35349
|
+
const ttyp = new Basic.TableType(found, {withHeader: true, keyType: Basic.TableKeyType.default});
|
|
35350
|
+
return new TypedIdentifier(name, input.filename, ttyp);
|
|
35351
|
+
} else {
|
|
35352
|
+
return new TypedIdentifier(name, input.filename, found);
|
|
35353
|
+
}
|
|
35354
|
+
}
|
|
35355
|
+
if (found instanceof Basic.UnknownType) {
|
|
35356
|
+
return new TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
|
|
35357
|
+
}
|
|
35358
|
+
if (found instanceof Basic.TableType && found.isWithHeader()) {
|
|
35359
|
+
found = found.getRowType();
|
|
35360
|
+
}
|
|
35361
|
+
if (!(found instanceof Basic.StructureType)) {
|
|
35362
|
+
const message = "not structured, " + typeName;
|
|
35363
|
+
input.issues.push(syntaxIssue(input, typeToken!, message));
|
|
35364
|
+
return new TypedIdentifier(name, input.filename, Basic.VoidType.get(CheckSyntaxKey));
|
|
35305
35365
|
}
|
|
35366
|
+
*/
|
|
35367
|
+
const found = new include_type_1.IncludeType().runSyntax(c, input);
|
|
35306
35368
|
if (found instanceof Basic.VoidType) {
|
|
35307
35369
|
if (table === true) {
|
|
35308
35370
|
const ttyp = new Basic.TableType(found, { withHeader: true, keyType: Basic.TableKeyType.default });
|
|
@@ -35312,18 +35374,7 @@ class Data {
|
|
|
35312
35374
|
return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
|
|
35313
35375
|
}
|
|
35314
35376
|
}
|
|
35315
|
-
|
|
35316
|
-
return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
|
|
35317
|
-
}
|
|
35318
|
-
if (found instanceof Basic.TableType && found.isWithHeader()) {
|
|
35319
|
-
found = found.getRowType();
|
|
35320
|
-
}
|
|
35321
|
-
if (!(found instanceof Basic.StructureType)) {
|
|
35322
|
-
const message = "not structured, " + typeName;
|
|
35323
|
-
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, typeToken, message));
|
|
35324
|
-
return new _typed_identifier_1.TypedIdentifier(name, input.filename, Basic.VoidType.get(_syntax_input_1.CheckSyntaxKey));
|
|
35325
|
-
}
|
|
35326
|
-
for (const c of found.getComponents()) {
|
|
35377
|
+
for (const c of found) {
|
|
35327
35378
|
components.push(c);
|
|
35328
35379
|
}
|
|
35329
35380
|
}
|
|
@@ -54898,7 +54949,7 @@ class Registry {
|
|
|
54898
54949
|
}
|
|
54899
54950
|
static abaplintVersion() {
|
|
54900
54951
|
// magic, see build script "version.sh"
|
|
54901
|
-
return "2.113.
|
|
54952
|
+
return "2.113.184";
|
|
54902
54953
|
}
|
|
54903
54954
|
getDDICReferences() {
|
|
54904
54955
|
return this.ddicReferences;
|
|
@@ -62843,6 +62894,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
62843
62894
|
}
|
|
62844
62895
|
replaceLineFunctions(node, lowFile, highSyntax, highFile) {
|
|
62845
62896
|
var _a, _b;
|
|
62897
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
62898
|
+
return undefined;
|
|
62899
|
+
}
|
|
62846
62900
|
const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
|
|
62847
62901
|
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
62848
62902
|
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.184",
|
|
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.184",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|