@abaplint/cli 2.111.0 → 2.111.1
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 +25 -46
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -24239,7 +24239,7 @@ class ComponentCompareSimple {
|
|
|
24239
24239
|
}
|
|
24240
24240
|
}
|
|
24241
24241
|
else {
|
|
24242
|
-
throw "ComponentCompareSimple, unexpected node";
|
|
24242
|
+
throw new Error("ComponentCompareSimple, unexpected node");
|
|
24243
24243
|
}
|
|
24244
24244
|
}
|
|
24245
24245
|
}
|
|
@@ -24623,12 +24623,18 @@ exports.Default = void 0;
|
|
|
24623
24623
|
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
24624
24624
|
const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js");
|
|
24625
24625
|
const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
24626
|
+
const constant_1 = __webpack_require__(/*! ./constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js");
|
|
24626
24627
|
class Default {
|
|
24627
24628
|
runSyntax(node, scope, filename) {
|
|
24628
24629
|
const chain = node.findDirectExpression(Expressions.FieldChain);
|
|
24629
24630
|
if (chain) {
|
|
24630
|
-
new field_chain_1.FieldChain().runSyntax(chain, scope, filename, _reference_1.ReferenceType.DataReadReference);
|
|
24631
|
+
return new field_chain_1.FieldChain().runSyntax(chain, scope, filename, _reference_1.ReferenceType.DataReadReference);
|
|
24632
|
+
}
|
|
24633
|
+
const constant = node.findDirectExpression(Expressions.Constant);
|
|
24634
|
+
if (constant) {
|
|
24635
|
+
return new constant_1.Constant().runSyntax(constant);
|
|
24631
24636
|
}
|
|
24637
|
+
return undefined;
|
|
24632
24638
|
}
|
|
24633
24639
|
}
|
|
24634
24640
|
exports.Default = Default;
|
|
@@ -24767,29 +24773,25 @@ const source_field_symbol_1 = __webpack_require__(/*! ./source_field_symbol */ "
|
|
|
24767
24773
|
const source_field_1 = __webpack_require__(/*! ./source_field */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field.js");
|
|
24768
24774
|
class FieldChain {
|
|
24769
24775
|
runSyntax(node, scope, filename, refType) {
|
|
24770
|
-
var _a, _b, _c
|
|
24771
|
-
|
|
24772
|
-
|
|
24773
|
-
|
|
24774
|
-
context = this.findTop(children[0], scope, filename, refType);
|
|
24775
|
-
}
|
|
24776
|
-
catch (error) {
|
|
24776
|
+
var _a, _b, _c;
|
|
24777
|
+
if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
|
|
24778
|
+
&& node.findDirectExpression(Expressions.ComponentName)) {
|
|
24779
|
+
// workaround for names with dashes, eg. "sy-repid"
|
|
24777
24780
|
const concat = node.concatTokens();
|
|
24778
|
-
|
|
24779
|
-
|
|
24780
|
-
|
|
24781
|
-
|
|
24782
|
-
|
|
24783
|
-
|
|
24784
|
-
if (refType) {
|
|
24785
|
-
scope.addReference(node.getFirstToken(), found, refType, filename);
|
|
24786
|
-
}
|
|
24787
|
-
// this is not completely correct, but will work, dashes in names is a mess anyhow
|
|
24788
|
-
return found.getType();
|
|
24781
|
+
const offset = ((_b = node.findDirectExpression(Expressions.FieldOffset)) === null || _b === void 0 ? void 0 : _b.concatTokens()) || "";
|
|
24782
|
+
const length = ((_c = node.findDirectExpression(Expressions.FieldLength)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "";
|
|
24783
|
+
const found = scope.findVariable(concat.replace(offset, "").replace(length, ""));
|
|
24784
|
+
if (found) {
|
|
24785
|
+
if (refType) {
|
|
24786
|
+
scope.addReference(node.getFirstToken(), found, refType, filename);
|
|
24789
24787
|
}
|
|
24788
|
+
// this is not completely correct, but will work, dashes in names is a mess anyhow
|
|
24789
|
+
return found.getType();
|
|
24790
24790
|
}
|
|
24791
|
-
throw error;
|
|
24792
24791
|
}
|
|
24792
|
+
let context = undefined;
|
|
24793
|
+
const children = node.getChildren();
|
|
24794
|
+
context = this.findTop(children[0], scope, filename, refType);
|
|
24793
24795
|
for (let i = 1; i < children.length; i++) {
|
|
24794
24796
|
const current = children[i];
|
|
24795
24797
|
if (current === undefined) {
|
|
@@ -24840,30 +24842,7 @@ class FieldChain {
|
|
|
24840
24842
|
if (context instanceof basic_1.TableType && context.isWithHeader()) {
|
|
24841
24843
|
context = context.getRowType();
|
|
24842
24844
|
}
|
|
24843
|
-
|
|
24844
|
-
context = new component_name_1.ComponentName().runSyntax(context, current);
|
|
24845
|
-
}
|
|
24846
|
-
catch (error) {
|
|
24847
|
-
const concat = node.concatTokens();
|
|
24848
|
-
if (concat.includes("-")) {
|
|
24849
|
-
// workaround for names with dashes, eg. "sy-repid"
|
|
24850
|
-
const offset = ((_d = node.findDirectExpression(Expressions.FieldOffset)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || "";
|
|
24851
|
-
const length = ((_e = node.findDirectExpression(Expressions.FieldLength)) === null || _e === void 0 ? void 0 : _e.concatTokens()) || "";
|
|
24852
|
-
const found = scope.findVariable(concat.replace(offset, "").replace(length, ""));
|
|
24853
|
-
if (found) {
|
|
24854
|
-
if (refType) {
|
|
24855
|
-
scope.addReference(node.getFirstToken(), found, refType, filename);
|
|
24856
|
-
}
|
|
24857
|
-
context = found.getType();
|
|
24858
|
-
}
|
|
24859
|
-
else {
|
|
24860
|
-
throw error;
|
|
24861
|
-
}
|
|
24862
|
-
}
|
|
24863
|
-
else {
|
|
24864
|
-
throw error;
|
|
24865
|
-
}
|
|
24866
|
-
}
|
|
24845
|
+
context = new component_name_1.ComponentName().runSyntax(context, current);
|
|
24867
24846
|
}
|
|
24868
24847
|
else if (current instanceof nodes_1.ExpressionNode
|
|
24869
24848
|
&& current.get() instanceof Expressions.TableExpression) {
|
|
@@ -51820,7 +51799,7 @@ class Registry {
|
|
|
51820
51799
|
}
|
|
51821
51800
|
static abaplintVersion() {
|
|
51822
51801
|
// magic, see build script "version.sh"
|
|
51823
|
-
return "2.111.
|
|
51802
|
+
return "2.111.1";
|
|
51824
51803
|
}
|
|
51825
51804
|
getDDICReferences() {
|
|
51826
51805
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.111.
|
|
3
|
+
"version": "2.111.1",
|
|
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.111.
|
|
41
|
+
"@abaplint/core": "^2.111.1",
|
|
42
42
|
"@types/chai": "^4.3.16",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|