@abaplint/cli 2.119.32 → 2.119.34

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.
Files changed (2) hide show
  1. package/build/cli.js +162 -30
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -2973,6 +2973,35 @@ exports.ExpandMacros = ExpandMacros;
2973
2973
 
2974
2974
  /***/ },
2975
2975
 
2976
+ /***/ "../core/build/src/abap/2_statements/expressions/_dynamic_access.js"
2977
+ /*!**************************************************************************!*\
2978
+ !*** ../core/build/src/abap/2_statements/expressions/_dynamic_access.js ***!
2979
+ \**************************************************************************/
2980
+ (__unused_webpack_module, exports, __webpack_require__) {
2981
+
2982
+ "use strict";
2983
+
2984
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
2985
+ exports.dynComp = dynComp;
2986
+ exports.dynAttr = dynAttr;
2987
+ const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_statements/combi.js");
2988
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
2989
+ const constant_1 = __webpack_require__(/*! ./constant */ "../core/build/src/abap/2_statements/expressions/constant.js");
2990
+ const field_chain_1 = __webpack_require__(/*! ./field_chain */ "../core/build/src/abap/2_statements/expressions/field_chain.js");
2991
+ const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
2992
+ const dynIdent = (0, combi_1.tok)(tokens_1.ParenLeft);
2993
+ const dynClose = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW));
2994
+ const dynInside = (0, combi_1.altPrio)(new field_chain_1.FieldChain(), constant_1.Constant);
2995
+ function dynComp(...inside) {
2996
+ return (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), dynIdent, dynInside, ...inside, dynClose));
2997
+ }
2998
+ function dynAttr() {
2999
+ return (0, combi_1.ver)(version_1.Version.v757, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), dynIdent, dynInside, dynClose));
3000
+ }
3001
+ //# sourceMappingURL=_dynamic_access.js.map
3002
+
3003
+ /***/ },
3004
+
2976
3005
  /***/ "../core/build/src/abap/2_statements/expressions/_select_core.js"
2977
3006
  /*!***********************************************************************!*\
2978
3007
  !*** ../core/build/src/abap/2_statements/expressions/_select_core.js ***!
@@ -2982,6 +3011,7 @@ exports.ExpandMacros = ExpandMacros;
2982
3011
  "use strict";
2983
3012
 
2984
3013
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3014
+ exports.buildSelectSingleCore = buildSelectSingleCore;
2985
3015
  exports.buildSelectCore = buildSelectCore;
2986
3016
  const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_statements/combi.js");
2987
3017
  const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
@@ -2989,7 +3019,26 @@ const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src
2989
3019
  const sql_group_by_1 = __webpack_require__(/*! ./sql_group_by */ "../core/build/src/abap/2_statements/expressions/sql_group_by.js");
2990
3020
  const sql_into_structure_1 = __webpack_require__(/*! ./sql_into_structure */ "../core/build/src/abap/2_statements/expressions/sql_into_structure.js");
2991
3021
  const sql_up_to_1 = __webpack_require__(/*! ./sql_up_to */ "../core/build/src/abap/2_statements/expressions/sql_up_to.js");
2992
- function buildSelectCore(into, allowOrderBy = true) {
3022
+ function buildSelectSingleCore(allowInto = false) {
3023
+ const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
3024
+ const sqlFields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields, version_1.Version.OpenABAP);
3025
+ const privileged = (0, combi_1.ver)(version_1.Version.v758, _1.SQLPrivilegedAccess);
3026
+ const fieldList = (0, combi_1.optPrio)(_1.SQLFieldList);
3027
+ const client = (0, combi_1.optPrio)(_1.SQLClient);
3028
+ const byp = (0, combi_1.optPrio)(_1.SQLBypassingBuffer);
3029
+ const whereClause = (0, combi_1.optPrio)(where);
3030
+ const groupHaving = (0, combi_1.seq)((0, combi_1.optPrio)(sql_group_by_1.SQLGroupBy), (0, combi_1.optPrio)(_1.SQLHaving));
3031
+ const trailingOpts = (0, combi_1.seq)((0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(_1.SQLHints), (0, combi_1.optPrio)(privileged), (0, combi_1.optPrio)(_1.SQLOptions));
3032
+ const intoSingle = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
3033
+ if (!allowInto) {
3034
+ const singleBody = (0, combi_1.seq)(_1.SQLFrom, client, byp, whereClause, groupHaving, trailingOpts);
3035
+ return (0, combi_1.seq)(fieldList, singleBody);
3036
+ }
3037
+ const singleAfterFrom = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.altPrio)((0, combi_1.seq)(intoSingle, byp, whereClause, groupHaving, trailingOpts), (0, combi_1.seq)((0, combi_1.optPrio)(sqlFields), whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle), (0, combi_1.optPrio)(_1.DatabaseConnection))));
3038
+ const singleIntoBeforeFrom = (0, combi_1.seq)(intoSingle, _1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), whereClause, groupHaving, trailingOpts);
3039
+ return (0, combi_1.seq)(fieldList, byp, (0, combi_1.altPrio)(singleIntoBeforeFrom, singleAfterFrom));
3040
+ }
3041
+ function buildSelectCore(allowInto = false, allowOrderBy = true) {
2993
3042
  const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
2994
3043
  const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("OFFSET", _1.SQLSource));
2995
3044
  const sqlFields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields, version_1.Version.OpenABAP);
@@ -3005,22 +3054,18 @@ function buildSelectCore(into, allowOrderBy = true) {
3005
3054
  : [];
3006
3055
  const trailingOpts = (0, combi_1.seq)((0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(_1.SQLHints), (0, combi_1.optPrio)(privileged), (0, combi_1.optPrio)(_1.SQLOptions));
3007
3056
  const intoSingle = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
3008
- const intoAny = into ? (0, combi_1.altPrio)(into, intoSingle) : intoSingle;
3009
3057
  const intoForPackSize = _1.SQLIntoTable;
3010
- if (!into) {
3011
- const afterFromNoInto = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, fae, whereClause, groupHaving, ...orderUpOff, trailingOpts), (0, combi_1.seq)(fae, whereClause, groupHaving, ...orderUpOff, trailingOpts)));
3012
- const singleBody = (0, combi_1.seq)(_1.SQLFrom, client, byp, whereClause, groupHaving, trailingOpts);
3013
- return (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, singleBody), (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, byp, afterFromNoInto)));
3058
+ if (!allowInto) {
3059
+ const afterFromNoInto = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.seq)((0, combi_1.optPrio)(sqlFields), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts));
3060
+ return (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", buildSelectSingleCore(false)), (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, byp, afterFromNoInto));
3014
3061
  }
3015
3062
  const fromPackSize = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLPackageSize), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo));
3016
- const trailingInto = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), (0, combi_1.optPrio)(_1.SQLOrderBy), (0, combi_1.optPrio)(_1.SQLOptions))), (0, combi_1.optPrio)((0, combi_1.seq)(intoSingle, byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), (0, combi_1.optPrio)(_1.SQLOptions))));
3017
- const afterFromWithInto = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLFrom), client, byp, fromPackSize, (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto), (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, (0, combi_1.optPrio)(_1.SQLOptions)), (0, combi_1.seq)(intoSingle, byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, fae, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), whereClause, groupHaving, ...orderUpOff, trailingOpts, (0, combi_1.optPrio)(_1.SQLOptions)), (0, combi_1.seq)(fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto)));
3018
- const selectTableIntoThenFrom = (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), afterFromWithInto);
3019
- const selectOtherIntoThenFrom = (0, combi_1.seq)(intoAny, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), afterFromWithInto);
3020
- const nonSingleBody = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.altPrio)(selectTableIntoThenFrom, selectOtherIntoThenFrom, afterFromWithInto));
3021
- const singleAfterFrom = (0, combi_1.seq)(_1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.altPrio)((0, combi_1.seq)(sqlFields, whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle), (0, combi_1.optPrio)(_1.DatabaseConnection)), (0, combi_1.seq)(intoSingle, byp, whereClause, groupHaving, trailingOpts), (0, combi_1.seq)(whereClause, groupHaving, trailingOpts, (0, combi_1.optPrio)(intoSingle), (0, combi_1.optPrio)(_1.DatabaseConnection))));
3022
- const singleIntoBeforeFrom = (0, combi_1.seq)(intoSingle, _1.SQLFrom, client, byp, (0, combi_1.optPrio)(_1.DatabaseConnection), whereClause, groupHaving, trailingOpts);
3023
- return (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, byp, (0, combi_1.altPrio)(singleIntoBeforeFrom, singleAfterFrom)), nonSingleBody));
3063
+ const trailingInto = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), (0, combi_1.optPrio)(_1.SQLOrderBy)), (0, combi_1.seq)(intoSingle, byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset)))), (0, combi_1.optPrio)(_1.SQLOptions));
3064
+ const afterFromWithInto = (0, combi_1.seq)((0, combi_1.optPrio)(_1.SQLFrom), client, byp, fromPackSize, (0, combi_1.altPrio)((0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts), (0, combi_1.seq)(intoSingle, byp, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, fae, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(offset), whereClause, groupHaving, ...orderUpOff, trailingOpts), (0, combi_1.seq)((0, combi_1.optPrio)(sqlFields), fae, whereClause, groupHaving, ...orderUpOff, trailingOpts, trailingInto)));
3065
+ const selectTableIntoThenFrom = (0, combi_1.seq)(intoForPackSize, (0, combi_1.optPrio)(_1.SQLPackageSize));
3066
+ const selectOtherIntoThenFrom = intoSingle;
3067
+ const nonSingleBody = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)((0, combi_1.altPrio)(selectTableIntoThenFrom, selectOtherIntoThenFrom)), (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), byp, (0, combi_1.optPrio)(_1.DatabaseConnection), afterFromWithInto);
3068
+ return (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", buildSelectSingleCore(true)), nonSingleBody);
3024
3069
  }
3025
3070
  //# sourceMappingURL=_select_core.js.map
3026
3071
 
@@ -4421,11 +4466,12 @@ exports.FieldChain = void 0;
4421
4466
  const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_statements/combi.js");
4422
4467
  const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
4423
4468
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
4469
+ const _dynamic_access_1 = __webpack_require__(/*! ./_dynamic_access */ "../core/build/src/abap/2_statements/expressions/_dynamic_access.js");
4424
4470
  class FieldChain extends combi_1.Expression {
4425
4471
  getRunnable() {
4426
4472
  const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), _1.AttributeName);
4427
4473
  const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(_1.ComponentName));
4428
- const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, attr, comp, _1.TableExpression));
4474
+ const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)), comp, _1.TableExpression));
4429
4475
  const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), _1.AttributeName);
4430
4476
  const start = (0, combi_1.altPrio)(clas, _1.SourceField, _1.SourceFieldSymbol);
4431
4477
  const after = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.DashW), (0, combi_1.seq)((0, combi_1.optPrio)(_1.TableBody), (0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)));
@@ -6874,10 +6920,10 @@ const _select_core_1 = __webpack_require__(/*! ./_select_core */ "../core/build/
6874
6920
  class Select extends combi_1.Expression {
6875
6921
  getRunnable() {
6876
6922
  const into = (0, combi_1.altPrio)(_1.SQLIntoTable, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
6877
- const standalone = (0, _select_core_1.buildSelectCore)(into);
6923
+ const standalone = (0, combi_1.altPrio)((0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), (0, _select_core_1.buildSelectSingleCore)(true)), (0, _select_core_1.buildSelectCore)(true));
6878
6924
  const unionTail = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)(_1.SQLSetOp), version_1.Version.OpenABAP);
6879
- const chained = (0, combi_1.seq)((0, _select_core_1.buildSelectCore)(undefined, false), unionTail, (0, combi_1.optPrio)(_1.SQLOrderBy), (0, combi_1.optPrio)(into));
6880
- return (0, combi_1.altPrio)(chained, standalone);
6925
+ const chained = (0, combi_1.seq)((0, _select_core_1.buildSelectCore)(false, false), unionTail, (0, combi_1.optPrio)(_1.SQLOrderBy), (0, combi_1.optPrio)(into));
6926
+ return (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(chained, standalone));
6881
6927
  }
6882
6928
  }
6883
6929
  exports.Select = Select;
@@ -7153,6 +7199,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src
7153
7199
  const text_element_1 = __webpack_require__(/*! ./text_element */ "../core/build/src/abap/2_statements/expressions/text_element.js");
7154
7200
  const attribute_chain_1 = __webpack_require__(/*! ./attribute_chain */ "../core/build/src/abap/2_statements/expressions/attribute_chain.js");
7155
7201
  const dereference_1 = __webpack_require__(/*! ./dereference */ "../core/build/src/abap/2_statements/expressions/dereference.js");
7202
+ const _dynamic_access_1 = __webpack_require__(/*! ./_dynamic_access */ "../core/build/src/abap/2_statements/expressions/_dynamic_access.js");
7156
7203
  // todo, COND and SWITCH are quite similar?
7157
7204
  // this class is used quite often, so its nice to have the differentiating tokens part of it
7158
7205
  class Source extends combi_1.Expression {
@@ -7160,7 +7207,8 @@ class Source extends combi_1.Expression {
7160
7207
  const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentChain);
7161
7208
  const attr = (0, combi_1.seq)(_1.Arrow, attribute_chain_1.AttributeChain);
7162
7209
  const deref = (0, combi_1.optPrio)((0, combi_1.ver)(version_1.Version.v756, dereference_1.Dereference));
7163
- const method = (0, combi_1.seq)(_1.MethodCallChain, (0, combi_1.optPrio)((0, combi_1.altPrio)(attr, comp)), deref);
7210
+ const dynChain = (0, combi_1.star)((0, combi_1.altPrio)((0, _dynamic_access_1.dynAttr)(), (0, _dynamic_access_1.dynComp)(), dereference_1.Dereference));
7211
+ const method = (0, combi_1.seq)(_1.MethodCallChain, (0, combi_1.optPrio)((0, combi_1.altPrio)(attr, comp)), deref, dynChain);
7164
7212
  const rparen = (0, combi_1.tok)(tokens_1.WParenRightW);
7165
7213
  const rparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW));
7166
7214
  const lparenNoSpace = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW));
@@ -7517,6 +7565,7 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/exp
7517
7565
  const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
7518
7566
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
7519
7567
  const sql_set_op_group_1 = __webpack_require__(/*! ./sql_set_op_group */ "../core/build/src/abap/2_statements/expressions/sql_set_op_group.js");
7568
+ const _select_core_1 = __webpack_require__(/*! ./_select_core */ "../core/build/src/abap/2_statements/expressions/_select_core.js");
7520
7569
  class SQLCompare extends combi_1.Expression {
7521
7570
  getRunnable() {
7522
7571
  const subSelect = (0, combi_1.ver)(version_1.Version.v750, sql_set_op_group_1.SQLSetOpGroup, version_1.Version.OpenABAP);
@@ -7529,7 +7578,9 @@ class SQLCompare extends combi_1.Expression {
7529
7578
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
7530
7579
  const at = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(_1.SimpleSource3, paren)), version_1.Version.OpenABAP);
7531
7580
  const rett = (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLCase, _1.SQLAggregation, _1.SQLFunction, _1.ConstantString, (0, combi_1.seq)((0, combi_1.altPrio)(_1.SQLPath, _1.SQLFieldName), (0, combi_1.optPrio)(arith)), at), (0, combi_1.altPrio)((0, combi_1.seq)(_1.SQLCompareOperator, (0, combi_1.altPrio)(sub, _1.SQLCase, _1.SQLAggregation, _1.SQLFunction, (0, combi_1.seq)(source, (0, combi_1.optPrio)(arith)))), (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(_1.SQLIn, like, between)), nul));
7532
- const exists = (0, combi_1.seq)("EXISTS", subSelect);
7581
+ // simple subquery for pre-v750 versions: EXISTS ( SELECT ... )
7582
+ const simpleSubSelect = (0, combi_1.seq)("(", "SELECT", (0, _select_core_1.buildSelectCore)(undefined, false), ")");
7583
+ const exists = (0, combi_1.seq)("EXISTS", (0, combi_1.altPrio)(subSelect, simpleSubSelect));
7533
7584
  return (0, combi_1.altPrio)(exists, _1.Dynamic, rett);
7534
7585
  }
7535
7586
  }
@@ -8098,7 +8149,7 @@ class SQLIn extends combi_1.Expression {
8098
8149
  const listNeww = (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP);
8099
8150
  const subSelect = sql_set_op_group_1.SQLSetOpGroup;
8100
8151
  // simple subquery for pre-v750 versions: IN ( SELECT ... ), https://github.com/abaplint/abaplint/issues/3999
8101
- const simpleSubSelect = (0, combi_1.seq)("(", (0, _select_core_1.buildSelectCore)(undefined, false), ")");
8152
+ const simpleSubSelect = (0, combi_1.seq)("(", "SELECT", (0, _select_core_1.buildSelectCore)(undefined, false), ")");
8102
8153
  const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(subSelect, simpleSubSelect, listOld, listNeww, _1.SQLSource));
8103
8154
  return inn;
8104
8155
  }
@@ -8410,7 +8461,7 @@ const sql_set_op_group_1 = __webpack_require__(/*! ./sql_set_op_group */ "../cor
8410
8461
  const _select_core_1 = __webpack_require__(/*! ./_select_core */ "../core/build/src/abap/2_statements/expressions/_select_core.js");
8411
8462
  class SQLSetOp extends combi_1.Expression {
8412
8463
  getRunnable() {
8413
- const operand = (0, combi_1.altPrio)(sql_set_op_group_1.SQLSetOpGroup, (0, _select_core_1.buildSelectCore)(undefined, false));
8464
+ const operand = (0, combi_1.altPrio)(sql_set_op_group_1.SQLSetOpGroup, (0, combi_1.seq)("SELECT", (0, _select_core_1.buildSelectCore)(false, false)));
8414
8465
  const union = (0, combi_1.seq)("UNION", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")));
8415
8466
  const intersectExcept = (0, combi_1.altPrio)((0, combi_1.seq)("INTERSECT", (0, combi_1.optPrio)("DISTINCT")), (0, combi_1.seq)("EXCEPT", (0, combi_1.optPrio)("DISTINCT")));
8416
8467
  const op = (0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v750, union, version_1.Version.OpenABAP), (0, combi_1.ver)(version_1.Version.v756, intersectExcept));
@@ -8438,7 +8489,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src
8438
8489
  const _select_core_1 = __webpack_require__(/*! ./_select_core */ "../core/build/src/abap/2_statements/expressions/_select_core.js");
8439
8490
  class SQLSetOpGroup extends combi_1.Expression {
8440
8491
  getRunnable() {
8441
- const operand = (0, combi_1.altPrio)(SQLSetOpGroup, (0, _select_core_1.buildSelectCore)(undefined, false));
8492
+ const operand = (0, combi_1.altPrio)(SQLSetOpGroup, (0, combi_1.seq)("SELECT", (0, _select_core_1.buildSelectCore)(false, false)));
8442
8493
  const chain = (0, combi_1.seq)(operand, (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.ver)(version_1.Version.v750, (0, combi_1.plusPrio)(_1.SQLSetOp), version_1.Version.OpenABAP), (0, combi_1.optPrio)(_1.SQLOrderBy))));
8443
8494
  return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("(", chain, ")"), version_1.Version.OpenABAP);
8444
8495
  }
@@ -8815,11 +8866,12 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/exp
8815
8866
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
8816
8867
  const attribute_name_1 = __webpack_require__(/*! ./attribute_name */ "../core/build/src/abap/2_statements/expressions/attribute_name.js");
8817
8868
  const dereference_1 = __webpack_require__(/*! ./dereference */ "../core/build/src/abap/2_statements/expressions/dereference.js");
8869
+ const _dynamic_access_1 = __webpack_require__(/*! ./_dynamic_access */ "../core/build/src/abap/2_statements/expressions/_dynamic_access.js");
8818
8870
  class Target extends combi_1.Expression {
8819
8871
  getRunnable() {
8820
8872
  const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), attribute_name_1.AttributeName);
8821
8873
  const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentName);
8822
- const something = (0, combi_1.starPrio)((0, combi_1.altPrio)(dereference_1.Dereference, attr, comp, _1.TableExpression));
8874
+ const something = (0, combi_1.starPrio)((0, combi_1.altPrio)(dereference_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)(), comp, _1.TableExpression));
8823
8875
  const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), attribute_name_1.AttributeName);
8824
8876
  const start = (0, combi_1.altPrio)(_1.Cast, _1.NewObject, clas, _1.TargetField, _1.TargetFieldSymbol);
8825
8877
  const fields = (0, combi_1.seq)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength));
@@ -26520,12 +26572,13 @@ class BasicTypes {
26520
26572
  || text.startsWith("TYPE TABLE FOR DELETE ")
26521
26573
  || text.startsWith("TYPE TABLE FOR UPDATE "))) {
26522
26574
  const name = typename.concatTokens();
26523
- const type = (_d = this.input.scope.getDDIC().lookupDDLS(name)) === null || _d === void 0 ? void 0 : _d.type;
26575
+ const ddlsName = this.getRAPBaseEntityName(name);
26576
+ const type = (_d = this.input.scope.getDDIC().lookupDDLS(ddlsName)) === null || _d === void 0 ? void 0 : _d.type;
26524
26577
  if (type) {
26525
26578
  return new Types.TableType(basic_1.VoidType.get("RAP-TODO"), options);
26526
26579
  }
26527
- else if (this.input.scope.getDDIC().inErrorNamespace(name)) {
26528
- return new Types.UnknownType(`DDLS ${name} not found`);
26580
+ else if (this.input.scope.getDDIC().inErrorNamespace(ddlsName)) {
26581
+ return new Types.UnknownType(`DDLS ${ddlsName} not found`);
26529
26582
  }
26530
26583
  else {
26531
26584
  return Types.VoidType.get(name);
@@ -26697,6 +26750,15 @@ class BasicTypes {
26697
26750
  }
26698
26751
  return false;
26699
26752
  }
26753
+ getRAPBaseEntityName(name) {
26754
+ const association = name.indexOf("\\_");
26755
+ const path = name.indexOf("\\\\");
26756
+ if (association === -1 && path === -1) {
26757
+ return name;
26758
+ }
26759
+ const splitAt = association === -1 ? path : path === -1 ? association : Math.min(association, path);
26760
+ return name.substring(0, splitAt);
26761
+ }
26700
26762
  // todo, rewrite this method
26701
26763
  resolveTypeChain(expr) {
26702
26764
  var _a, _b, _c, _d;
@@ -32633,9 +32695,15 @@ exports.SQLIn = void 0;
32633
32695
  const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "../core/build/src/abap/2_statements/expressions/index.js"));
32634
32696
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "../core/build/src/abap/types/basic/index.js");
32635
32697
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/build/src/abap/5_syntax/_syntax_input.js");
32698
+ const sql_set_op_group_1 = __webpack_require__(/*! ./sql_set_op_group */ "../core/build/src/abap/5_syntax/expressions/sql_set_op_group.js");
32636
32699
  const sql_source_1 = __webpack_require__(/*! ./sql_source */ "../core/build/src/abap/5_syntax/expressions/sql_source.js");
32637
32700
  class SQLIn {
32638
32701
  static runSyntax(node, input) {
32702
+ const setop = node.findDirectExpression(Expressions.SQLSetOpGroup);
32703
+ if (setop) {
32704
+ sql_set_op_group_1.SQLSetOpGroup.runSyntax(setop, input);
32705
+ return;
32706
+ }
32639
32707
  if (node.getChildren().length === 2) {
32640
32708
  const insource = node.findFirstExpression(Expressions.SQLSource);
32641
32709
  if (insource) {
@@ -32722,6 +32790,69 @@ exports.SQLOrderBy = SQLOrderBy;
32722
32790
 
32723
32791
  /***/ },
32724
32792
 
32793
+ /***/ "../core/build/src/abap/5_syntax/expressions/sql_set_op_group.js"
32794
+ /*!***********************************************************************!*\
32795
+ !*** ../core/build/src/abap/5_syntax/expressions/sql_set_op_group.js ***!
32796
+ \***********************************************************************/
32797
+ (__unused_webpack_module, exports, __webpack_require__) {
32798
+
32799
+ "use strict";
32800
+
32801
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
32802
+ if (k2 === undefined) k2 = k;
32803
+ var desc = Object.getOwnPropertyDescriptor(m, k);
32804
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
32805
+ desc = { enumerable: true, get: function() { return m[k]; } };
32806
+ }
32807
+ Object.defineProperty(o, k2, desc);
32808
+ }) : (function(o, m, k, k2) {
32809
+ if (k2 === undefined) k2 = k;
32810
+ o[k2] = m[k];
32811
+ }));
32812
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
32813
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
32814
+ }) : function(o, v) {
32815
+ o["default"] = v;
32816
+ });
32817
+ var __importStar = (this && this.__importStar) || (function () {
32818
+ var ownKeys = function(o) {
32819
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32820
+ var ar = [];
32821
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
32822
+ return ar;
32823
+ };
32824
+ return ownKeys(o);
32825
+ };
32826
+ return function (mod) {
32827
+ if (mod && mod.__esModule) return mod;
32828
+ var result = {};
32829
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32830
+ __setModuleDefault(result, mod);
32831
+ return result;
32832
+ };
32833
+ })();
32834
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
32835
+ exports.SQLSetOpGroup = void 0;
32836
+ const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "../core/build/src/abap/2_statements/expressions/index.js"));
32837
+ const select_1 = __webpack_require__(/*! ./select */ "../core/build/src/abap/5_syntax/expressions/select.js");
32838
+ class SQLSetOpGroup {
32839
+ static runSyntax(node, input) {
32840
+ if (node.findDirectExpression(Expressions.SQLFrom)) {
32841
+ select_1.Select.runSyntax(node, input, true);
32842
+ }
32843
+ for (const group of node.findDirectExpressions(Expressions.SQLSetOpGroup)) {
32844
+ SQLSetOpGroup.runSyntax(group, input);
32845
+ }
32846
+ for (const setop of node.findDirectExpressions(Expressions.SQLSetOp)) {
32847
+ SQLSetOpGroup.runSyntax(setop, input);
32848
+ }
32849
+ }
32850
+ }
32851
+ exports.SQLSetOpGroup = SQLSetOpGroup;
32852
+ //# sourceMappingURL=sql_set_op_group.js.map
32853
+
32854
+ /***/ },
32855
+
32725
32856
  /***/ "../core/build/src/abap/5_syntax/expressions/sql_source.js"
32726
32857
  /*!*****************************************************************!*\
32727
32858
  !*** ../core/build/src/abap/5_syntax/expressions/sql_source.js ***!
@@ -50102,7 +50233,9 @@ class MethodParameters {
50102
50233
  }
50103
50234
  workaroundRAP(node, input, parentName) {
50104
50235
  const resultName = node.findExpressionAfterToken("RESULT");
50105
- const isRap = node.findExpressionAfterToken("IMPORTING");
50236
+ const concat = node.concatTokens().toUpperCase();
50237
+ const isRap = node.findExpressionAfterToken("IMPORTING")
50238
+ || (concat.includes(" IMPORTING REQUEST ") ? node.findExpressionAfterToken("REQUEST") : undefined);
50106
50239
  if (isRap) {
50107
50240
  for (const foo of node.findDirectExpressions(Expressions.MethodParamName)) {
50108
50241
  if (foo === resultName) {
@@ -50110,7 +50243,6 @@ class MethodParameters {
50110
50243
  }
50111
50244
  this.importing.push(new _typed_identifier_1.TypedIdentifier(foo.getFirstToken(), input.filename, basic_1.VoidType.get("RapMethodParameter"), ["importing" /* IdentifierMeta.MethodImporting */]));
50112
50245
  }
50113
- const concat = node.concatTokens().toUpperCase();
50114
50246
  if (concat.includes(" FOR VALIDATE ")
50115
50247
  || concat.includes(" FOR BEHAVIOR ")
50116
50248
  || concat.includes(" FOR DETERMINE ")
@@ -66030,7 +66162,7 @@ class Registry {
66030
66162
  }
66031
66163
  static abaplintVersion() {
66032
66164
  // magic, see build script "version.js"
66033
- return "2.119.32";
66165
+ return "2.119.34";
66034
66166
  }
66035
66167
  getDDICReferences() {
66036
66168
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.32",
3
+ "version": "2.119.34",
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.32",
41
+ "@abaplint/core": "^2.119.34",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",