@abaplint/cli 2.113.233 → 2.113.235
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 +66 -12
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -5045,7 +5045,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
|
|
|
5045
5045
|
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
5046
5046
|
class DefinitionName extends combi_1.Expression {
|
|
5047
5047
|
getRunnable() {
|
|
5048
|
-
const r = (0, combi_1.regex)(/^&|&?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w
|
|
5048
|
+
const r = (0, combi_1.regex)(/^&|&?((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%\?#]+)$/);
|
|
5049
5049
|
return (0, combi_1.seq)(r, (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(r))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
|
|
5050
5050
|
}
|
|
5051
5051
|
}
|
|
@@ -13352,12 +13352,12 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
|
|
|
13352
13352
|
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
13353
13353
|
class Field {
|
|
13354
13354
|
getMatcher() {
|
|
13355
|
-
const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST")));
|
|
13355
|
+
const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST", "AT CURSOR-SELECTION")));
|
|
13356
13356
|
const values = (0, combi_1.seq)("VALUES", (0, combi_1.tok)(tokens_1.WParenLeft), "BETWEEN", expressions_1.Constant, "AND", expressions_1.Constant, (0, combi_1.tok)(tokens_1.ParenRightW));
|
|
13357
13357
|
const wit = (0, combi_1.seq)("WITH", expressions_1.FieldChain);
|
|
13358
13358
|
const cond = (0, combi_1.seq)(expressions_1.FieldChain, "=", expressions_1.FieldChain);
|
|
13359
13359
|
const where = (0, combi_1.seq)(cond, (0, combi_1.starPrio)((0, combi_1.seq)("AND", cond)));
|
|
13360
|
-
const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, "INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE");
|
|
13360
|
+
const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, (0, combi_1.opt)("INTO RESULT WHENEVER NOT FOUND SEND ERRORMESSAGE"));
|
|
13361
13361
|
const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit, select)));
|
|
13362
13362
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
13363
13363
|
}
|
|
@@ -15773,7 +15773,9 @@ class Perform {
|
|
|
15773
15773
|
const program = (0, combi_1.seq)("IN PROGRAM", (0, combi_1.opt)((0, combi_1.alt)(Expressions.Dynamic, Expressions.IncludeName)));
|
|
15774
15774
|
const found = (0, combi_1.str)("IF FOUND");
|
|
15775
15775
|
const full = (0, combi_1.seq)((0, combi_1.alt)(Expressions.FormName, Expressions.Dynamic), (0, combi_1.opt)((0, combi_1.verNot)(version_1.Version.Cloud, program)));
|
|
15776
|
-
const
|
|
15776
|
+
const normal = (0, combi_1.seq)((0, combi_1.opt)(found), (0, combi_1.opt)(expressions_1.PerformTables), (0, combi_1.opt)(expressions_1.PerformUsing), (0, combi_1.opt)(expressions_1.PerformChanging), (0, combi_1.opt)(found), (0, combi_1.opt)(commit));
|
|
15777
|
+
const of = (0, combi_1.seq)("OF", (0, combi_1.plus)(Expressions.FormName));
|
|
15778
|
+
const ret = (0, combi_1.seq)("PERFORM", (0, combi_1.alt)(short, full), (0, combi_1.altPrio)(of, normal));
|
|
15777
15779
|
return ret;
|
|
15778
15780
|
}
|
|
15779
15781
|
}
|
|
@@ -24085,6 +24087,7 @@ exports.AssertError = AssertError;
|
|
|
24085
24087
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24086
24088
|
exports.BasicTypes = void 0;
|
|
24087
24089
|
const _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
24090
|
+
const nodes_1 = __webpack_require__(/*! ../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
24088
24091
|
const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
24089
24092
|
const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
24090
24093
|
const Types = __webpack_require__(/*! ../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
@@ -24241,6 +24244,30 @@ class BasicTypes {
|
|
|
24241
24244
|
type = new basic_1.TableType(type.getRowType(), { withHeader: false, keyType: Types.TableKeyType.default });
|
|
24242
24245
|
}
|
|
24243
24246
|
}
|
|
24247
|
+
else if (child instanceof nodes_1.ExpressionNode && child.get() instanceof Expressions.FieldLength) {
|
|
24248
|
+
const len = parseInt(child.concatTokens().replace("(", "").replace(")", ""), 10);
|
|
24249
|
+
if (isNaN(len)) {
|
|
24250
|
+
type = new Types.UnknownType("Type error, invalid field length");
|
|
24251
|
+
}
|
|
24252
|
+
else {
|
|
24253
|
+
if (type instanceof Types.DateType) {
|
|
24254
|
+
if (len > 8) {
|
|
24255
|
+
type = new Types.UnknownType("Type error, offset too long");
|
|
24256
|
+
}
|
|
24257
|
+
else {
|
|
24258
|
+
type = new Types.CharacterType(len);
|
|
24259
|
+
}
|
|
24260
|
+
}
|
|
24261
|
+
else if (type instanceof Types.CharacterType) {
|
|
24262
|
+
if (len <= type.getLength()) {
|
|
24263
|
+
type = new Types.CharacterType(len);
|
|
24264
|
+
}
|
|
24265
|
+
else {
|
|
24266
|
+
type = new Types.UnknownType("Type error, offset too long");
|
|
24267
|
+
}
|
|
24268
|
+
}
|
|
24269
|
+
}
|
|
24270
|
+
}
|
|
24244
24271
|
else { // field name
|
|
24245
24272
|
if (type instanceof Types.TableType) {
|
|
24246
24273
|
type = type.getRowType();
|
|
@@ -26519,11 +26546,19 @@ class InlineData {
|
|
|
26519
26546
|
if (type instanceof basic_1.CSequenceType || type instanceof basic_1.CLikeType) {
|
|
26520
26547
|
type = basic_1.StringType.get();
|
|
26521
26548
|
}
|
|
26549
|
+
else if (type instanceof basic_1.XSequenceType) {
|
|
26550
|
+
type = basic_1.StringType.get();
|
|
26551
|
+
}
|
|
26522
26552
|
else if (type instanceof basic_1.CGenericType) {
|
|
26523
26553
|
const message = "InlineData, generic type C cannot be used for inferred type";
|
|
26524
26554
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
26525
26555
|
return;
|
|
26526
26556
|
}
|
|
26557
|
+
if (type.isGeneric()) {
|
|
26558
|
+
const message = "DATA definition cannot be generic, " + type.constructor.name;
|
|
26559
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
26560
|
+
type = basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
26561
|
+
}
|
|
26527
26562
|
const identifier = new _typed_identifier_1.TypedIdentifier(token, input.filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
26528
26563
|
input.scope.addIdentifier(identifier);
|
|
26529
26564
|
input.scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, input.filename);
|
|
@@ -28459,15 +28494,20 @@ class Source {
|
|
|
28459
28494
|
const s = Source.runSyntax(node.findDirectExpression(Expressions.Source), input);
|
|
28460
28495
|
/*
|
|
28461
28496
|
console.dir(node.concatTokens());
|
|
28462
|
-
console.dir(targetType);
|
|
28463
|
-
console.dir(foundType);
|
|
28464
28497
|
console.dir(s);
|
|
28498
|
+
console.dir(foundType);
|
|
28499
|
+
console.dir(targetType);
|
|
28465
28500
|
*/
|
|
28466
28501
|
if (foundType && foundType.isGeneric() && s) {
|
|
28467
28502
|
foundType = new basic_1.DataReference(s);
|
|
28468
28503
|
}
|
|
28469
28504
|
else if (foundType === undefined && s) {
|
|
28470
|
-
|
|
28505
|
+
if (s instanceof basic_1.AnyType) {
|
|
28506
|
+
foundType = new basic_1.DataReference(basic_1.VoidType.get("REF-ANY"));
|
|
28507
|
+
}
|
|
28508
|
+
else {
|
|
28509
|
+
foundType = new basic_1.DataReference(s);
|
|
28510
|
+
}
|
|
28471
28511
|
}
|
|
28472
28512
|
else if (foundType && targetType === undefined) {
|
|
28473
28513
|
foundType = new basic_1.DataReference(foundType);
|
|
@@ -31988,18 +32028,25 @@ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ ".
|
|
|
31988
32028
|
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
31989
32029
|
const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js");
|
|
31990
32030
|
const unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js");
|
|
32031
|
+
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
31991
32032
|
class FieldSymbol {
|
|
31992
32033
|
runSyntax(node, input) {
|
|
31993
32034
|
var _a;
|
|
31994
32035
|
const fsname = (_a = node.findFirstExpression(Expressions.FieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
32036
|
+
if (fsname === undefined) {
|
|
32037
|
+
return;
|
|
32038
|
+
}
|
|
32039
|
+
if (node.getChildren().length === 5) {
|
|
32040
|
+
// no type specified
|
|
32041
|
+
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, basic_1.VoidType.get("FS-SIMPLE")));
|
|
32042
|
+
return;
|
|
32043
|
+
}
|
|
31995
32044
|
const bfound = new basic_types_1.BasicTypes(input).parseType(node);
|
|
31996
|
-
if (bfound
|
|
32045
|
+
if (bfound) {
|
|
31997
32046
|
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, bfound));
|
|
31998
32047
|
return;
|
|
31999
32048
|
}
|
|
32000
|
-
|
|
32001
|
-
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, new unknown_type_1.UnknownType("Fieldsymbol, fallback")));
|
|
32002
|
-
}
|
|
32049
|
+
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fsname, input.filename, new unknown_type_1.UnknownType("Fieldsymbol, fallback")));
|
|
32003
32050
|
}
|
|
32004
32051
|
}
|
|
32005
32052
|
exports.FieldSymbol = FieldSymbol;
|
|
@@ -54765,13 +54812,20 @@ class Registry {
|
|
|
54765
54812
|
this.objectsByType = {};
|
|
54766
54813
|
this.dependencies = {};
|
|
54767
54814
|
this.setConfig(conf ? conf : config_1.Config.getDefault());
|
|
54815
|
+
this.clear();
|
|
54816
|
+
}
|
|
54817
|
+
/** clears all objects, keeping the configuration */
|
|
54818
|
+
clear() {
|
|
54819
|
+
this.objects = {};
|
|
54820
|
+
this.objectsByType = {};
|
|
54821
|
+
this.dependencies = {};
|
|
54768
54822
|
this.ddicReferences = new ddic_references_1.DDICReferences();
|
|
54769
54823
|
this.msagReferences = new msag_references_1.MSAGReferences();
|
|
54770
54824
|
this.macroReferences = new macro_references_1.MacroReferences();
|
|
54771
54825
|
}
|
|
54772
54826
|
static abaplintVersion() {
|
|
54773
54827
|
// magic, see build script "version.sh"
|
|
54774
|
-
return "2.113.
|
|
54828
|
+
return "2.113.235";
|
|
54775
54829
|
}
|
|
54776
54830
|
getDDICReferences() {
|
|
54777
54831
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.235",
|
|
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.235",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|