@abaplint/cli 2.119.9 → 2.119.10
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 +41 -14
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -28614,6 +28614,9 @@ class Select {
|
|
|
28614
28614
|
const ret = [];
|
|
28615
28615
|
if (node.get() instanceof Expressions.SelectLoop) {
|
|
28616
28616
|
expr = node.findFirstExpression(Expressions.SQLFieldListLoop);
|
|
28617
|
+
if (expr === undefined) {
|
|
28618
|
+
expr = node;
|
|
28619
|
+
}
|
|
28617
28620
|
}
|
|
28618
28621
|
else {
|
|
28619
28622
|
expr = node.findFirstExpression(Expressions.SQLFieldList);
|
|
@@ -28621,7 +28624,8 @@ class Select {
|
|
|
28621
28624
|
if (((_a = expr === null || expr === void 0 ? void 0 : expr.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Dynamic) {
|
|
28622
28625
|
dynamic_1.Dynamic.runSyntax(expr.getFirstChild(), input);
|
|
28623
28626
|
}
|
|
28624
|
-
|
|
28627
|
+
// eslint-disable-next-line max-len
|
|
28628
|
+
for (const field of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressionsMulti([Expressions.SQLField, Expressions.SQLFieldName, Expressions.SQLAggregation])) || []) {
|
|
28625
28629
|
let code = field.concatTokens().toUpperCase();
|
|
28626
28630
|
const as = ((_b = field.findDirectExpression(Expressions.SQLAsName)) === null || _b === void 0 ? void 0 : _b.concatTokens()) || "";
|
|
28627
28631
|
if (as !== "") {
|
|
@@ -34136,16 +34140,21 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
34136
34140
|
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
34137
34141
|
class Parameter {
|
|
34138
34142
|
runSyntax(node, input) {
|
|
34139
|
-
|
|
34140
|
-
|
|
34143
|
+
const nameExpression = node.findFirstExpression(Expressions.FieldSub);
|
|
34144
|
+
if (nameExpression === undefined) {
|
|
34145
|
+
return;
|
|
34146
|
+
}
|
|
34147
|
+
let nameToken = nameExpression.getFirstToken();
|
|
34148
|
+
// FieldSub can include dashes and optional length, eg p-tcode or p_table(4).
|
|
34149
|
+
if (nameExpression.getChildren().length > 1) {
|
|
34150
|
+
const fullName = nameExpression.concatTokens().replace(/\(.+$/, "").replace(/\[\]$/, "");
|
|
34151
|
+
nameToken = new tokens_1.Identifier(nameToken.getStart(), fullName);
|
|
34152
|
+
}
|
|
34141
34153
|
if (nameToken && nameToken.getStr().length > 8) {
|
|
34142
34154
|
const message = "Parameter name too long, " + nameToken.getStr();
|
|
34143
34155
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
34144
34156
|
return;
|
|
34145
34157
|
}
|
|
34146
|
-
else if (nameToken === undefined) {
|
|
34147
|
-
return;
|
|
34148
|
-
}
|
|
34149
34158
|
if (node.findDirectTokenByText("RADIOBUTTON") && node.findDirectTokenByText("LENGTH")) {
|
|
34150
34159
|
const message = "RADIOBUTTON and LENGTH not possible together";
|
|
34151
34160
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
@@ -34952,23 +34961,28 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
34952
34961
|
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
34953
34962
|
class SelectOption {
|
|
34954
34963
|
runSyntax(node, input) {
|
|
34955
|
-
|
|
34956
|
-
|
|
34964
|
+
const nameExpression = node.findFirstExpression(Expressions.FieldSub);
|
|
34965
|
+
if (nameExpression === undefined) {
|
|
34966
|
+
return;
|
|
34967
|
+
}
|
|
34968
|
+
let nameToken = nameExpression.getFirstToken();
|
|
34969
|
+
// FieldSub can include dashes and optional length, eg s-matnr or s_name(10).
|
|
34970
|
+
if (nameExpression.getChildren().length > 1) {
|
|
34971
|
+
const fullName = nameExpression.concatTokens().replace(/\(.+$/, "").replace(/\[\]$/, "");
|
|
34972
|
+
nameToken = new tokens_1.Identifier(nameToken.getStart(), fullName);
|
|
34973
|
+
}
|
|
34957
34974
|
if (nameToken && nameToken.getStr().length > 8) {
|
|
34958
34975
|
const message = "Select-option name too long, " + nameToken.getStr();
|
|
34959
34976
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameToken, message));
|
|
34960
34977
|
return;
|
|
34961
34978
|
}
|
|
34962
|
-
else if (nameToken === undefined) {
|
|
34963
|
-
return;
|
|
34964
|
-
}
|
|
34965
34979
|
for (const d of node.findDirectExpressions(Expressions.Dynamic)) {
|
|
34966
34980
|
dynamic_1.Dynamic.runSyntax(d, input);
|
|
34967
34981
|
input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(nameToken, input.filename, basic_1.VoidType.get("DYNAMIC_SELECT_OPTION")));
|
|
34968
34982
|
return;
|
|
34969
34983
|
}
|
|
34970
|
-
const
|
|
34971
|
-
let found = new basic_types_1.BasicTypes(input).resolveLikeName(
|
|
34984
|
+
const nameChain = node.findFirstExpression(Expressions.FieldChain);
|
|
34985
|
+
let found = new basic_types_1.BasicTypes(input).resolveLikeName(nameChain);
|
|
34972
34986
|
if (found) {
|
|
34973
34987
|
if (found instanceof basic_1.StructureType) {
|
|
34974
34988
|
let length = 0;
|
|
@@ -56225,7 +56239,7 @@ class Registry {
|
|
|
56225
56239
|
}
|
|
56226
56240
|
static abaplintVersion() {
|
|
56227
56241
|
// magic, see build script "version.sh"
|
|
56228
|
-
return "2.119.
|
|
56242
|
+
return "2.119.10";
|
|
56229
56243
|
}
|
|
56230
56244
|
getDDICReferences() {
|
|
56231
56245
|
return this.ddicReferences;
|
|
@@ -73728,6 +73742,19 @@ This rule makes sure the spaces are consistently required across the language.`,
|
|
|
73728
73742
|
return issues;
|
|
73729
73743
|
}
|
|
73730
73744
|
missingSpace(statement) {
|
|
73745
|
+
{
|
|
73746
|
+
const tokens = statement.getTokens();
|
|
73747
|
+
for (let i = 1; i < tokens.length; i++) {
|
|
73748
|
+
const prev = tokens[i - 1];
|
|
73749
|
+
const current = tokens[i];
|
|
73750
|
+
if (prev.getStr() === ")"
|
|
73751
|
+
&& current.getStr() === "="
|
|
73752
|
+
&& prev.getRow() === current.getRow()
|
|
73753
|
+
&& prev.getEnd().getCol() === current.getStart().getCol()) {
|
|
73754
|
+
return current.getStart();
|
|
73755
|
+
}
|
|
73756
|
+
}
|
|
73757
|
+
}
|
|
73731
73758
|
const found = statement.findAllExpressionsMulti([
|
|
73732
73759
|
Expressions.CondSub, Expressions.SQLCond, Expressions.ValueBodyLine,
|
|
73733
73760
|
Expressions.NewObject, Expressions.Cond, Expressions.ComponentCond,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.10",
|
|
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.119.
|
|
41
|
+
"@abaplint/core": "^2.119.10",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|