@abaplint/cli 2.102.55 → 2.102.56
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 +23 -6
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -16498,9 +16498,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
16498
16498
|
exports.TruncateDataset = void 0;
|
|
16499
16499
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
16500
16500
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
16501
|
+
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
16501
16502
|
class TruncateDataset {
|
|
16502
16503
|
getMatcher() {
|
|
16503
|
-
return (0, combi_1.seq)("TRUNCATE DATASET", expressions_1.Source, "AT CURRENT POSITION");
|
|
16504
|
+
return (0, combi_1.verNot)(version_1.Version.Cloud, (0, combi_1.seq)("TRUNCATE DATASET", expressions_1.Source, "AT CURRENT POSITION"));
|
|
16504
16505
|
}
|
|
16505
16506
|
}
|
|
16506
16507
|
exports.TruncateDataset = TruncateDataset;
|
|
@@ -21873,6 +21874,7 @@ class TypeUtils {
|
|
|
21873
21874
|
else if (source instanceof basic_1.XStringType) {
|
|
21874
21875
|
if (target instanceof basic_1.CLikeType
|
|
21875
21876
|
|| target instanceof basic_1.IntegerType
|
|
21877
|
+
|| target instanceof basic_1.StringType
|
|
21876
21878
|
|| target instanceof basic_1.ObjectReferenceType
|
|
21877
21879
|
|| target instanceof basic_1.HexType) {
|
|
21878
21880
|
return false;
|
|
@@ -24672,6 +24674,7 @@ class MethodCallChain {
|
|
|
24672
24674
|
if (first.get() instanceof Expressions.MethodCall) {
|
|
24673
24675
|
children.unshift(first);
|
|
24674
24676
|
}
|
|
24677
|
+
let previous = "";
|
|
24675
24678
|
while (children.length > 0) {
|
|
24676
24679
|
const current = children.shift();
|
|
24677
24680
|
if (current === undefined) {
|
|
@@ -24692,6 +24695,9 @@ class MethodCallChain {
|
|
|
24692
24695
|
}
|
|
24693
24696
|
}
|
|
24694
24697
|
else {
|
|
24698
|
+
if (previous === "=>" && (method === null || method === void 0 ? void 0 : method.isStatic()) === false) {
|
|
24699
|
+
throw new Error("Method \"" + methodName + "\" not static");
|
|
24700
|
+
}
|
|
24695
24701
|
const extra = {
|
|
24696
24702
|
ooName: foundDef === null || foundDef === void 0 ? void 0 : foundDef.getName(),
|
|
24697
24703
|
ooType: foundDef instanceof class_definition_1.ClassDefinition ? "CLAS" : "INTF"
|
|
@@ -24729,6 +24735,7 @@ class MethodCallChain {
|
|
|
24729
24735
|
else if (current instanceof nodes_1.ExpressionNode && current.get() instanceof Expressions.AttributeName) {
|
|
24730
24736
|
context = new attribute_name_1.AttributeName().runSyntax(context, current, scope, filename);
|
|
24731
24737
|
}
|
|
24738
|
+
previous = current.concatTokens();
|
|
24732
24739
|
}
|
|
24733
24740
|
return context;
|
|
24734
24741
|
}
|
|
@@ -26389,7 +26396,8 @@ class StringTemplate {
|
|
|
26389
26396
|
if (type === undefined) {
|
|
26390
26397
|
throw new Error("No target type determined");
|
|
26391
26398
|
}
|
|
26392
|
-
else if (typeUtils.isCharLike(type) === false && typeUtils.isHexLike(type) === false)
|
|
26399
|
+
else if ((typeUtils.isCharLike(type) === false && typeUtils.isHexLike(type) === false)
|
|
26400
|
+
|| type instanceof basic_1.StructureType) {
|
|
26393
26401
|
throw new Error("Not character like, " + type.constructor.name);
|
|
26394
26402
|
}
|
|
26395
26403
|
const format = templateSource.findDirectExpression(Expressions.StringTemplateFormatting);
|
|
@@ -27436,9 +27444,10 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
|
|
|
27436
27444
|
const fstarget_1 = __webpack_require__(/*! ../expressions/fstarget */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/fstarget.js");
|
|
27437
27445
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
27438
27446
|
const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js");
|
|
27447
|
+
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
27439
27448
|
class Assign {
|
|
27440
27449
|
runSyntax(node, scope, filename) {
|
|
27441
|
-
var _a
|
|
27450
|
+
var _a;
|
|
27442
27451
|
const assignSource = node.findDirectExpression(Expressions.AssignSource);
|
|
27443
27452
|
const sources = (assignSource === null || assignSource === void 0 ? void 0 : assignSource.findDirectExpressions(Expressions.Source)) || [];
|
|
27444
27453
|
const theSource = sources[sources.length - 1];
|
|
@@ -27457,10 +27466,18 @@ class Assign {
|
|
|
27457
27466
|
else {
|
|
27458
27467
|
sourceType = new source_1.Source().runSyntax(theSource, scope, filename);
|
|
27459
27468
|
}
|
|
27460
|
-
if (
|
|
27469
|
+
if ((assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren().length) === 5
|
|
27470
|
+
&& ((_a = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens()) === "COMPONENT") {
|
|
27471
|
+
const componentSource = sources[sources.length - 2];
|
|
27472
|
+
const componentType = new source_1.Source().runSyntax(componentSource, scope, filename);
|
|
27473
|
+
if (new _type_utils_1.TypeUtils(scope).isAssignable(componentType, new basic_1.CharacterType(30)) === false) {
|
|
27474
|
+
throw new Error("component name must be charlike");
|
|
27475
|
+
}
|
|
27476
|
+
}
|
|
27477
|
+
if (sourceType === undefined || (assignSource === null || assignSource === void 0 ? void 0 : assignSource.findDirectExpression(Expressions.Dynamic))) {
|
|
27461
27478
|
sourceType = new basic_1.AnyType();
|
|
27462
27479
|
}
|
|
27463
|
-
for (const d of (
|
|
27480
|
+
for (const d of (assignSource === null || assignSource === void 0 ? void 0 : assignSource.findAllExpressions(Expressions.Dynamic)) || []) {
|
|
27464
27481
|
new dynamic_1.Dynamic().runSyntax(d, scope, filename);
|
|
27465
27482
|
}
|
|
27466
27483
|
const target = node.findDirectExpression(Expressions.FSTarget);
|
|
@@ -49187,7 +49204,7 @@ class Registry {
|
|
|
49187
49204
|
}
|
|
49188
49205
|
static abaplintVersion() {
|
|
49189
49206
|
// magic, see build script "version.sh"
|
|
49190
|
-
return "2.102.
|
|
49207
|
+
return "2.102.56";
|
|
49191
49208
|
}
|
|
49192
49209
|
getDDICReferences() {
|
|
49193
49210
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.56",
|
|
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.102.
|
|
41
|
+
"@abaplint/core": "^2.102.56",
|
|
42
42
|
"@types/chai": "^4.3.6",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.3",
|