@abaplint/cli 2.113.173 → 2.113.175
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 +29 -13
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -9200,7 +9200,7 @@ class TableExpression extends combi_1.Expression {
|
|
|
9200
9200
|
const key = (0, combi_1.seq)("KEY", _1.SimpleName);
|
|
9201
9201
|
const index = (0, combi_1.seq)("INDEX", _1.Source);
|
|
9202
9202
|
const ret = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.BracketLeftW), (0, combi_1.alt)(_1.Source, (0, combi_1.seq)((0, combi_1.optPrio)(key), (0, combi_1.opt)("COMPONENTS"), (0, combi_1.altPrio)(fields, index))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WBracketRight), (0, combi_1.tok)(tokens_1.WBracketRightW)));
|
|
9203
|
-
return (0, combi_1.ver)(version_1.Version.v740sp02, ret);
|
|
9203
|
+
return (0, combi_1.ver)(version_1.Version.v740sp02, ret, version_1.Version.OpenABAP);
|
|
9204
9204
|
}
|
|
9205
9205
|
}
|
|
9206
9206
|
exports.TableExpression = TableExpression;
|
|
@@ -25570,9 +25570,14 @@ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ ".
|
|
|
25570
25570
|
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
|
|
25571
25571
|
class CorrespondingBody {
|
|
25572
25572
|
static runSyntax(node, input, targetType) {
|
|
25573
|
+
var _a;
|
|
25573
25574
|
if (node === undefined) {
|
|
25574
25575
|
return targetType;
|
|
25575
25576
|
}
|
|
25577
|
+
const base = (_a = node.findDirectExpression(Expressions.CorrespondingBodyBase)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Source);
|
|
25578
|
+
if (base) {
|
|
25579
|
+
source_1.Source.runSyntax(base, input);
|
|
25580
|
+
}
|
|
25576
25581
|
let type = undefined;
|
|
25577
25582
|
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
25578
25583
|
if (type === undefined) {
|
|
@@ -27794,8 +27799,9 @@ class Select {
|
|
|
27794
27799
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27795
27800
|
return;
|
|
27796
27801
|
}
|
|
27802
|
+
const isSingle = node.getChildren()[1].concatTokens().toUpperCase() === "SINGLE";
|
|
27797
27803
|
this.checkFields(fields, dbSources, input, node);
|
|
27798
|
-
this.handleInto(node, input, fields, dbSources);
|
|
27804
|
+
this.handleInto(node, input, fields, dbSources, isSingle);
|
|
27799
27805
|
const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
|
|
27800
27806
|
if (fae) {
|
|
27801
27807
|
input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
|
|
@@ -27895,7 +27901,7 @@ class Select {
|
|
|
27895
27901
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27896
27902
|
}
|
|
27897
27903
|
}
|
|
27898
|
-
static handleInto(node, input, fields, dbSources) {
|
|
27904
|
+
static handleInto(node, input, fields, dbSources, isSingle) {
|
|
27899
27905
|
const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
|
|
27900
27906
|
if (intoTable) {
|
|
27901
27907
|
const inline = intoTable.findFirstExpression(Expressions.InlineData);
|
|
@@ -27905,9 +27911,15 @@ class Select {
|
|
|
27905
27911
|
}
|
|
27906
27912
|
const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
|
|
27907
27913
|
if (intoStructure) {
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
inline_data_1.InlineData.runSyntax(
|
|
27914
|
+
const inlineList = intoStructure.findAllExpressions(Expressions.InlineData);
|
|
27915
|
+
if (inlineList.length === 1 && fields.length === 1 && dbSources.length === 1 && isSingle === false) {
|
|
27916
|
+
inline_data_1.InlineData.runSyntax(inlineList[0], input, this.buildTableType(fields, dbSources, input.scope));
|
|
27917
|
+
}
|
|
27918
|
+
else {
|
|
27919
|
+
for (const inline of inlineList) {
|
|
27920
|
+
// todo, for now these are voided
|
|
27921
|
+
inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo1"));
|
|
27922
|
+
}
|
|
27911
27923
|
}
|
|
27912
27924
|
}
|
|
27913
27925
|
const intoList = node.findDirectExpression(Expressions.SQLIntoList);
|
|
@@ -27929,7 +27941,7 @@ class Select {
|
|
|
27929
27941
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27930
27942
|
return;
|
|
27931
27943
|
}
|
|
27932
|
-
let type = basic_1.VoidType.get("
|
|
27944
|
+
let type = basic_1.VoidType.get("SELECT_todo2");
|
|
27933
27945
|
if (isSimple.test(field.code)) {
|
|
27934
27946
|
for (const dbSource of dbSources) {
|
|
27935
27947
|
if (dbSource === undefined) {
|
|
@@ -27981,15 +27993,15 @@ class Select {
|
|
|
27981
27993
|
}
|
|
27982
27994
|
static buildTableType(fields, dbSources, scope) {
|
|
27983
27995
|
if (dbSources.length !== 1) {
|
|
27984
|
-
return basic_1.VoidType.get("
|
|
27996
|
+
return basic_1.VoidType.get("SELECT_todo3");
|
|
27985
27997
|
}
|
|
27986
27998
|
if (dbSources[0] === undefined) {
|
|
27987
27999
|
// then its a voided table
|
|
27988
|
-
return basic_1.VoidType.get("
|
|
28000
|
+
return basic_1.VoidType.get("SELECT_todo4");
|
|
27989
28001
|
}
|
|
27990
28002
|
const dbType = dbSources[0].parseType(scope.getRegistry());
|
|
27991
28003
|
if (!(dbType instanceof basic_1.StructureType)) {
|
|
27992
|
-
return basic_1.VoidType.get("
|
|
28004
|
+
return basic_1.VoidType.get("SELECT_todo5");
|
|
27993
28005
|
}
|
|
27994
28006
|
if (fields.length === 1 && fields[0].code === "*") {
|
|
27995
28007
|
return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
@@ -28000,13 +28012,13 @@ class Select {
|
|
|
28000
28012
|
for (const field of fields) {
|
|
28001
28013
|
const type = dbType.getComponentByName(field.code);
|
|
28002
28014
|
if (type === undefined) {
|
|
28003
|
-
return basic_1.VoidType.get("
|
|
28015
|
+
return basic_1.VoidType.get("SELECT_todo6");
|
|
28004
28016
|
}
|
|
28005
28017
|
components.push({ name: field.code, type });
|
|
28006
28018
|
}
|
|
28007
28019
|
return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
|
|
28008
28020
|
}
|
|
28009
|
-
return basic_1.VoidType.get("
|
|
28021
|
+
return basic_1.VoidType.get("SELECT_todo7");
|
|
28010
28022
|
}
|
|
28011
28023
|
static findFields(node, input) {
|
|
28012
28024
|
var _a, _b;
|
|
@@ -54846,7 +54858,7 @@ class Registry {
|
|
|
54846
54858
|
}
|
|
54847
54859
|
static abaplintVersion() {
|
|
54848
54860
|
// magic, see build script "version.sh"
|
|
54849
|
-
return "2.113.
|
|
54861
|
+
return "2.113.175";
|
|
54850
54862
|
}
|
|
54851
54863
|
getDDICReferences() {
|
|
54852
54864
|
return this.ddicReferences;
|
|
@@ -62662,6 +62674,9 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
62662
62674
|
return false;
|
|
62663
62675
|
}
|
|
62664
62676
|
replaceXsdBool(node, lowFile, highSyntax) {
|
|
62677
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
62678
|
+
return undefined;
|
|
62679
|
+
}
|
|
62665
62680
|
const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
|
|
62666
62681
|
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
62667
62682
|
if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference
|
|
@@ -66225,6 +66240,7 @@ class InlineDataOldVersions extends _abap_rule_1.ABAPRule {
|
|
|
66225
66240
|
runParsed(file) {
|
|
66226
66241
|
const issues = [];
|
|
66227
66242
|
if (this.reg.getConfig().getVersion() >= version_1.Version.v740sp02
|
|
66243
|
+
|| this.reg.getConfig().getVersion() === version_1.Version.OpenABAP
|
|
66228
66244
|
|| this.reg.getConfig().getVersion() === version_1.Version.Cloud) {
|
|
66229
66245
|
return [];
|
|
66230
66246
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.175",
|
|
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.175",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|