@abaplint/cli 2.101.17 → 2.101.18
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 +44 -8
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -21679,6 +21679,9 @@ class TypeUtils {
|
|
|
21679
21679
|
if (target instanceof basic_1.StructureType && this.structureContainsString(target)) {
|
|
21680
21680
|
return false;
|
|
21681
21681
|
}
|
|
21682
|
+
else if (target instanceof basic_1.IntegerType) {
|
|
21683
|
+
return false;
|
|
21684
|
+
}
|
|
21682
21685
|
else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
|
|
21683
21686
|
if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
|
|
21684
21687
|
return true;
|
|
@@ -21705,6 +21708,11 @@ class TypeUtils {
|
|
|
21705
21708
|
return false;
|
|
21706
21709
|
}
|
|
21707
21710
|
}
|
|
21711
|
+
else if (source instanceof basic_1.FloatType) {
|
|
21712
|
+
if (target instanceof basic_1.IntegerType) {
|
|
21713
|
+
return false;
|
|
21714
|
+
}
|
|
21715
|
+
}
|
|
21708
21716
|
else if (source instanceof basic_1.XStringType) {
|
|
21709
21717
|
if (target instanceof basic_1.CLikeType) {
|
|
21710
21718
|
return false;
|
|
@@ -25664,19 +25672,24 @@ class Source {
|
|
|
25664
25672
|
context = new string_template_1.StringTemplate().runSyntax(first, scope, filename);
|
|
25665
25673
|
}
|
|
25666
25674
|
else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Source) {
|
|
25667
|
-
|
|
25675
|
+
const found = new Source().runSyntax(first, scope, filename);
|
|
25676
|
+
context = this.infer(context, found);
|
|
25668
25677
|
}
|
|
25669
25678
|
else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Constant) {
|
|
25670
|
-
|
|
25679
|
+
const found = new constant_1.Constant().runSyntax(first);
|
|
25680
|
+
context = this.infer(context, found);
|
|
25671
25681
|
}
|
|
25672
25682
|
else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.Dereference) {
|
|
25673
25683
|
context = new dereference_1.Dereference().runSyntax(context);
|
|
25674
|
-
// } else if (first instanceof ExpressionNode && first.get() instanceof Expressions.ArrowOrDash) {
|
|
25675
|
-
// console.dir("dash");
|
|
25676
25684
|
}
|
|
25677
25685
|
else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ComponentChain) {
|
|
25678
25686
|
context = new component_chain_1.ComponentChain().runSyntax(context, first, scope, filename);
|
|
25679
25687
|
}
|
|
25688
|
+
else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.ArithOperator) {
|
|
25689
|
+
if (first.concatTokens() === "**") {
|
|
25690
|
+
context = new basic_1.FloatType();
|
|
25691
|
+
}
|
|
25692
|
+
}
|
|
25680
25693
|
else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.AttributeChain) {
|
|
25681
25694
|
context = new attribute_chain_1.AttributeChain().runSyntax(context, first, scope, filename, type);
|
|
25682
25695
|
}
|
|
@@ -25691,6 +25704,14 @@ class Source {
|
|
|
25691
25704
|
return context;
|
|
25692
25705
|
}
|
|
25693
25706
|
////////////////////////////////
|
|
25707
|
+
infer(context, found) {
|
|
25708
|
+
if (context instanceof basic_1.FloatType && found instanceof basic_1.IntegerType) {
|
|
25709
|
+
return context;
|
|
25710
|
+
}
|
|
25711
|
+
else {
|
|
25712
|
+
return found;
|
|
25713
|
+
}
|
|
25714
|
+
}
|
|
25694
25715
|
addIfInferred(node, scope, filename, inferredType) {
|
|
25695
25716
|
const basic = new basic_types_1.BasicTypes(filename, scope);
|
|
25696
25717
|
const typeExpression = node.findFirstExpression(Expressions.TypeNameOrInfer);
|
|
@@ -25832,6 +25853,7 @@ exports.SourceFieldSymbol = SourceFieldSymbol;
|
|
|
25832
25853
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25833
25854
|
exports.SQLCompare = void 0;
|
|
25834
25855
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
25856
|
+
const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
25835
25857
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
25836
25858
|
const sql_source_1 = __webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js");
|
|
25837
25859
|
class SQLCompare {
|
|
@@ -25840,7 +25862,12 @@ class SQLCompare {
|
|
|
25840
25862
|
let sourceType;
|
|
25841
25863
|
let token;
|
|
25842
25864
|
for (const s of node.findAllExpressions(Expressions.SQLSource)) {
|
|
25843
|
-
|
|
25865
|
+
for (const child of s.getChildren()) {
|
|
25866
|
+
if (child instanceof nodes_1.ExpressionNode) {
|
|
25867
|
+
token = child.getFirstToken();
|
|
25868
|
+
break;
|
|
25869
|
+
}
|
|
25870
|
+
}
|
|
25844
25871
|
sourceType = new sql_source_1.SQLSource().runSyntax(s, scope, filename);
|
|
25845
25872
|
}
|
|
25846
25873
|
const fieldName = (_a = node.findDirectExpression(Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens();
|
|
@@ -29303,7 +29330,6 @@ const dynamic_1 = __webpack_require__(/*! ../expressions/dynamic */ "./node_modu
|
|
|
29303
29330
|
const loop_group_by_1 = __webpack_require__(/*! ../expressions/loop_group_by */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/loop_group_by.js");
|
|
29304
29331
|
class Loop {
|
|
29305
29332
|
runSyntax(node, scope, filename) {
|
|
29306
|
-
var _a;
|
|
29307
29333
|
const loopTarget = node.findDirectExpression(Expressions.LoopTarget);
|
|
29308
29334
|
let target = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.Target);
|
|
29309
29335
|
const targetType = target ? new target_1.Target().runSyntax(target, scope, filename) : undefined;
|
|
@@ -29337,14 +29363,24 @@ class Loop {
|
|
|
29337
29363
|
&& concat.startsWith("LOOP AT GROUP ") === false) {
|
|
29338
29364
|
throw new Error("Loop, not a table type");
|
|
29339
29365
|
}
|
|
29366
|
+
else if (loopTarget === undefined
|
|
29367
|
+
&& sourceType instanceof basic_1.TableType
|
|
29368
|
+
&& sourceType.isWithHeader() === false) {
|
|
29369
|
+
throw new Error("Loop, no header");
|
|
29370
|
+
}
|
|
29371
|
+
const targetConcat = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.concatTokens().toUpperCase();
|
|
29340
29372
|
if (sourceType instanceof basic_1.TableType) {
|
|
29341
|
-
const targetConcat = (_a = node.findDirectExpression(Expressions.LoopTarget)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
29342
29373
|
rowType = sourceType.getRowType();
|
|
29343
29374
|
sourceType = rowType;
|
|
29344
29375
|
if (targetConcat === null || targetConcat === void 0 ? void 0 : targetConcat.startsWith("REFERENCE INTO ")) {
|
|
29345
29376
|
sourceType = new basic_1.DataReference(sourceType);
|
|
29346
29377
|
}
|
|
29347
29378
|
}
|
|
29379
|
+
if (targetConcat
|
|
29380
|
+
&& targetConcat.startsWith("TRANSPORTING ")
|
|
29381
|
+
&& node.findDirectTokenByText("WHERE") === undefined) {
|
|
29382
|
+
throw new Error("Loop, TRANSPORTING NO FIELDS only with WHERE");
|
|
29383
|
+
}
|
|
29348
29384
|
const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
|
|
29349
29385
|
if (inline) {
|
|
29350
29386
|
new inline_data_1.InlineData().runSyntax(inline, scope, filename, sourceType);
|
|
@@ -48412,7 +48448,7 @@ class Registry {
|
|
|
48412
48448
|
}
|
|
48413
48449
|
static abaplintVersion() {
|
|
48414
48450
|
// magic, see build script "version.sh"
|
|
48415
|
-
return "2.101.
|
|
48451
|
+
return "2.101.18";
|
|
48416
48452
|
}
|
|
48417
48453
|
getDDICReferences() {
|
|
48418
48454
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.101.
|
|
3
|
+
"version": "2.101.18",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.101.
|
|
41
|
+
"@abaplint/core": "^2.101.18",
|
|
42
42
|
"@types/chai": "^4.3.5",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.2",
|
|
45
45
|
"@types/mocha": "^10.0.1",
|
|
46
|
-
"@types/node": "^20.
|
|
46
|
+
"@types/node": "^20.3.1",
|
|
47
47
|
"@types/progress": "^2.0.5",
|
|
48
48
|
"chai": "^4.3.7",
|
|
49
49
|
"chalk": "^5.2.0",
|