@abaplint/cli 2.113.47 → 2.113.49

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 +73 -42
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -5130,7 +5130,7 @@ class Field extends combi_1.Expression {
5130
5130
  getRunnable() {
5131
5131
  // "&1" can be used for almost anything(field names, method names etc.) in macros
5132
5132
  // field names with only digits should not be possible
5133
- return (0, combi_1.regex)(/^[&_!]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
5133
+ return (0, combi_1.regex)(/^[&_!?]?\*?\w*(\/\w+\/)?\d*[a-zA-Z_%\$][\w\*%\$\?#]*(~\w+)?$/);
5134
5134
  }
5135
5135
  }
5136
5136
  exports.Field = Field;
@@ -5255,7 +5255,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
5255
5255
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
5256
5256
  class FieldOffset extends combi_1.Expression {
5257
5257
  getRunnable() {
5258
- const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2));
5258
+ const offset = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Plus), (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), _1.SimpleFieldChain2)));
5259
5259
  return offset;
5260
5260
  }
5261
5261
  }
@@ -10387,7 +10387,8 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
10387
10387
  class Break {
10388
10388
  getMatcher() {
10389
10389
  const next = (0, combi_1.str)("AT NEXT APPLICATION STATEMENT");
10390
- const ret = (0, combi_1.altPrio)((0, combi_1.seq)("BREAK-POINT", (0, combi_1.optPrio)((0, combi_1.altPrio)(next, expressions_1.Source))), (0, combi_1.seq)("BREAK", expressions_1.FieldSub));
10390
+ // note BREAK is a special macro that wraps the parameter in a char
10391
+ const ret = (0, combi_1.altPrio)((0, combi_1.seq)("BREAK-POINT", (0, combi_1.optPrio)((0, combi_1.altPrio)(next, expressions_1.Source))), (0, combi_1.seq)("BREAK", (0, combi_1.starPrio)((0, combi_1.regex)(/.*/))));
10391
10392
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10392
10393
  }
10393
10394
  }
@@ -40120,7 +40121,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
40120
40121
  class CDSAggregate extends combi_1.Expression {
40121
40122
  getRunnable() {
40122
40123
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40123
- const value = (0, combi_1.alt)(name, _1.CDSCast, _1.CDSCase);
40124
+ const value = (0, combi_1.alt)(name, "*", _1.CDSCast, _1.CDSCase, _1.CDSFunction);
40124
40125
  return (0, combi_1.seq)((0, combi_1.alt)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
40125
40126
  }
40126
40127
  }
@@ -40266,7 +40267,10 @@ class CDSArithmetics extends combi_1.Expression {
40266
40267
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40267
40268
  const val = (0, combi_1.alt)(cds_integer_1.CDSInteger, name, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString);
40268
40269
  const operator = (0, combi_1.altPrio)("+", "-", "*", "/");
40269
- return (0, combi_1.seq)(val, operator, val);
40270
+ const operatorValue = (0, combi_1.seq)(operator, val);
40271
+ const paren = (0, combi_1.seq)("(", val, (0, combi_1.plus)(operatorValue), ")");
40272
+ const noParen = (0, combi_1.seq)(val, (0, combi_1.plus)(operatorValue));
40273
+ return (0, combi_1.altPrio)(paren, noParen);
40270
40274
  }
40271
40275
  }
40272
40276
  exports.CDSArithmetics = CDSArithmetics;
@@ -40603,40 +40607,43 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
40603
40607
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
40604
40608
  class CDSFunction extends combi_1.Expression {
40605
40609
  getRunnable() {
40606
- const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
40607
- const input = (0, combi_1.altPrio)(_1.CDSCast, CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
40608
- const coalesce = (0, combi_1.seq)("COALESCE", "(", input, ",", input, ")");
40609
- const concat = (0, combi_1.seq)("CONCAT", "(", input, ",", input, ")");
40610
- const concat_with_space = (0, combi_1.seq)("CONCAT_WITH_SPACE", "(", input, ",", input, ",", input, ")");
40611
- const dats_add_days = (0, combi_1.seq)("DATS_ADD_DAYS", "(", input, ",", input, ",", input, ")");
40612
- const dats_add_months = (0, combi_1.seq)("DATS_ADD_MONTHS", "(", input, ",", input, ",", input, ")");
40613
- const dats_days_between = (0, combi_1.seq)("DATS_DAYS_BETWEEN", "(", input, ",", input, ")");
40614
- const dats_is_valid = (0, combi_1.seq)("DATS_IS_VALID", "(", input, ")");
40615
- const substring = (0, combi_1.seq)("SUBSTRING", "(", input, ",", input, ",", input, ")");
40616
- const bintohex = (0, combi_1.seq)("BINTOHEX", "(", input, ")");
40617
- const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", input, ")");
40618
- const upper = (0, combi_1.seq)("UPPER", "(", input, ")");
40619
- const lower = (0, combi_1.seq)("LOWER", "(", input, ")");
40620
- const abs = (0, combi_1.seq)("ABS", "(", input, ")");
40621
- const ceil = (0, combi_1.seq)("CEIL", "(", input, ")");
40622
- const floor = (0, combi_1.seq)("FLOOR", "(", input, ")");
40623
- const round = (0, combi_1.seq)("ROUND", "(", input, ",", input, ")");
40624
- const div = (0, combi_1.seq)("DIV", "(", input, ",", input, ")");
40625
- const division = (0, combi_1.seq)("DIVISION", "(", input, ",", input, ")");
40626
- const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", input, ",", input, ",", input, ",", input, ")");
40627
- const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", input, ",", input, ",", input, ",", input, ")");
40628
- const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", input, ",", input, ",", input, ",", input, ")");
40629
- const dats_tims_to_tstmp = (0, combi_1.seq)("DATS_TIMS_TO_TSTMP", "(", input, ",", input, ",", input, ",", input, ",", input, ")");
40630
- const tstmp_is_valid = (0, combi_1.seq)("TSTMP_IS_VALID", "(", input, ")");
40610
+ const coalesce = (0, combi_1.seq)("COALESCE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40611
+ const concat = (0, combi_1.seq)("CONCAT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40612
+ const concat_with_space = (0, combi_1.seq)("CONCAT_WITH_SPACE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40613
+ const dats_add_days = (0, combi_1.seq)("DATS_ADD_DAYS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40614
+ const dats_add_months = (0, combi_1.seq)("DATS_ADD_MONTHS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40615
+ const dats_days_between = (0, combi_1.seq)("DATS_DAYS_BETWEEN", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40616
+ const dats_is_valid = (0, combi_1.seq)("DATS_IS_VALID", "(", _1.CDSFunctionInput, ")");
40617
+ const substring = (0, combi_1.seq)("SUBSTRING", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40618
+ const bintohex = (0, combi_1.seq)("BINTOHEX", "(", _1.CDSFunctionInput, ")");
40619
+ const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", _1.CDSFunctionInput, ")");
40620
+ const upper = (0, combi_1.seq)("UPPER", "(", _1.CDSFunctionInput, ")");
40621
+ const lower = (0, combi_1.seq)("LOWER", "(", _1.CDSFunctionInput, ")");
40622
+ const abs = (0, combi_1.seq)("ABS", "(", _1.CDSFunctionInput, ")");
40623
+ const ceil = (0, combi_1.seq)("CEIL", "(", _1.CDSFunctionInput, ")");
40624
+ const floor = (0, combi_1.seq)("FLOOR", "(", _1.CDSFunctionInput, ")");
40625
+ const round = (0, combi_1.seq)("ROUND", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40626
+ const div = (0, combi_1.seq)("DIV", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40627
+ const division = (0, combi_1.seq)("DIVISION", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40628
+ const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40629
+ const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40630
+ const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40631
+ const dats_tims_to_tstmp = (0, combi_1.seq)("DATS_TIMS_TO_TSTMP", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40632
+ const tstmp_is_valid = (0, combi_1.seq)("TSTMP_IS_VALID", "(", _1.CDSFunctionInput, ")");
40631
40633
  const tstmp_current_utctimestamp = (0, combi_1.seq)("TSTMP_CURRENT_UTCTIMESTAMP", "(", ")");
40632
- const tstmp_seconds_between = (0, combi_1.seq)("TSTMP_SECONDS_BETWEEN", "(", input, ",", input, ",", input, ")");
40633
- const tstmp_add_seconds = (0, combi_1.seq)("TSTMP_ADD_SECONDS", "(", input, ",", input, ",", input, ")");
40634
- const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", input, ",", input, ")");
40635
- const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", input, ",", input, ",", input, ")");
40636
- const mod = (0, combi_1.seq)("MOD", "(", input, ",", input, ")");
40637
- const left = (0, combi_1.seq)("LEFT", "(", input, ",", input, ")");
40638
- const right = (0, combi_1.seq)("RIGHT", "(", input, ",", input, ")");
40639
- return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, upper, lower, abs, ceil, floor, round, div, division, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right);
40634
+ const tstmp_seconds_between = (0, combi_1.seq)("TSTMP_SECONDS_BETWEEN", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40635
+ const tstmp_add_seconds = (0, combi_1.seq)("TSTMP_ADD_SECONDS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40636
+ const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40637
+ const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40638
+ const mod = (0, combi_1.seq)("MOD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40639
+ const left = (0, combi_1.seq)("LEFT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40640
+ const right = (0, combi_1.seq)("RIGHT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
40641
+ const conversionInput = (0, combi_1.seq)(_1.CDSName, "=", ">", _1.CDSFunctionInput);
40642
+ const conversionInputs = (0, combi_1.seq)(conversionInput, (0, combi_1.starPrio)((0, combi_1.seq)(",", conversionInput)));
40643
+ const unitConversion = (0, combi_1.seq)("UNIT_CONVERSION", "(", conversionInputs, ")");
40644
+ const currencyConversion = (0, combi_1.seq)("CURRENCY_CONVERSION", "(", conversionInputs, ")");
40645
+ const decimalShift = (0, combi_1.seq)("DECIMAL_SHIFT", "(", conversionInputs, ")");
40646
+ return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, upper, lower, abs, ceil, floor, round, div, division, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right, unitConversion, currencyConversion, decimalShift);
40640
40647
  }
40641
40648
  }
40642
40649
  exports.CDSFunction = CDSFunction;
@@ -40644,6 +40651,30 @@ exports.CDSFunction = CDSFunction;
40644
40651
 
40645
40652
  /***/ }),
40646
40653
 
40654
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function_input.js":
40655
+ /*!*************************************************************************************!*\
40656
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_function_input.js ***!
40657
+ \*************************************************************************************/
40658
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
40659
+
40660
+ "use strict";
40661
+
40662
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
40663
+ exports.CDSFunctionInput = void 0;
40664
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
40665
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
40666
+ class CDSFunctionInput extends combi_1.Expression {
40667
+ getRunnable() {
40668
+ const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
40669
+ const input = (0, combi_1.altPrio)(_1.CDSCast, _1.CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
40670
+ return input;
40671
+ }
40672
+ }
40673
+ exports.CDSFunctionInput = CDSFunctionInput;
40674
+ //# sourceMappingURL=cds_function_input.js.map
40675
+
40676
+ /***/ }),
40677
+
40647
40678
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js":
40648
40679
  /*!*******************************************************************************!*\
40649
40680
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js ***!
@@ -41054,6 +41085,7 @@ __exportStar(__webpack_require__(/*! ./cds_define_view */ "./node_modules/@abapl
41054
41085
  __exportStar(__webpack_require__(/*! ./cds_element */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js"), exports);
41055
41086
  __exportStar(__webpack_require__(/*! ./cds_extend_view */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_extend_view.js"), exports);
41056
41087
  __exportStar(__webpack_require__(/*! ./cds_function */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js"), exports);
41088
+ __exportStar(__webpack_require__(/*! ./cds_function_input */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function_input.js"), exports);
41057
41089
  __exportStar(__webpack_require__(/*! ./cds_group_by */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js"), exports);
41058
41090
  __exportStar(__webpack_require__(/*! ./cds_having */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_having.js"), exports);
41059
41091
  __exportStar(__webpack_require__(/*! ./cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js"), exports);
@@ -43469,15 +43501,13 @@ exports.Definition = Definition;
43469
43501
  Object.defineProperty(exports, "__esModule", ({ value: true }));
43470
43502
  exports.Diagnostics = void 0;
43471
43503
  const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
43472
- const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
43473
43504
  const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
43474
43505
  class Diagnostics {
43475
43506
  constructor(reg) {
43476
43507
  this.reg = reg;
43477
43508
  }
43478
43509
  findIssues(textDocument) {
43479
- this.reg.parse();
43480
- const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri); // todo, this sould also run for xml files
43510
+ const file = this.reg.getFileByName(textDocument.uri);
43481
43511
  if (file === undefined) {
43482
43512
  return [];
43483
43513
  }
@@ -43485,6 +43515,7 @@ class Diagnostics {
43485
43515
  if (obj === undefined) {
43486
43516
  return [];
43487
43517
  }
43518
+ this.reg.parse();
43488
43519
  let issues = this.reg.findIssuesObject(obj);
43489
43520
  issues = issues.filter(i => i.getFilename() === file.getFilename());
43490
43521
  return issues;
@@ -53077,7 +53108,7 @@ class Registry {
53077
53108
  }
53078
53109
  static abaplintVersion() {
53079
53110
  // magic, see build script "version.sh"
53080
- return "2.113.47";
53111
+ return "2.113.49";
53081
53112
  }
53082
53113
  getDDICReferences() {
53083
53114
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.47",
3
+ "version": "2.113.49",
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.47",
41
+ "@abaplint/core": "^2.113.49",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",