@abaplint/cli 2.113.97 → 2.113.99

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 +42 -10
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -13004,7 +13004,7 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
13004
13004
  // todo, cloud, split?
13005
13005
  class Export {
13006
13006
  getMatcher() {
13007
- const from = (0, combi_1.seq)("FROM", expressions_1.Source);
13007
+ const from = (0, combi_1.seq)((0, combi_1.altPrio)("FROM", "="), expressions_1.Source);
13008
13008
  const client = (0, combi_1.seq)("CLIENT", expressions_1.Source);
13009
13009
  const id = (0, combi_1.seq)("ID", expressions_1.Source);
13010
13010
  const using = (0, combi_1.seq)("USING", expressions_1.Source);
@@ -13016,7 +13016,7 @@ class Export {
13016
13016
  const database = (0, combi_1.seq)("DATABASE", cluster, (0, combi_1.per)(from, client, id, using));
13017
13017
  const target = (0, combi_1.alt)(buffer, memory, database, table, shared);
13018
13018
  const left = (0, combi_1.alt)(expressions_1.FieldSub, expressions_1.FieldSymbol);
13019
- const source = (0, combi_1.alt)((0, combi_1.plus)((0, combi_1.altPrio)(expressions_1.ParameterS, (0, combi_1.seq)(left, from), left)), expressions_1.Dynamic, expressions_1.Constant);
13019
+ const source = (0, combi_1.alt)((0, combi_1.plus)((0, combi_1.altPrio)((0, combi_1.seq)(left, from), left)), expressions_1.Dynamic, expressions_1.Constant);
13020
13020
  const compression = (0, combi_1.seq)("COMPRESSION", (0, combi_1.alt)("ON", "OFF"));
13021
13021
  const hint = (0, combi_1.seq)("CODE PAGE HINT", expressions_1.Source);
13022
13022
  return (0, combi_1.seq)("EXPORT", source, "TO", target, (0, combi_1.opt)(compression), (0, combi_1.opt)(hint));
@@ -35933,6 +35933,7 @@ exports.DECLARATION_STUFF = [
35933
35933
  Statements.Parameter,
35934
35934
  Statements.SelectionScreen,
35935
35935
  Statements.ConstantBegin,
35936
+ Statements.Define,
35936
35937
  ];
35937
35938
  //# sourceMappingURL=selection_events.js.map
35938
35939
 
@@ -41006,7 +41007,7 @@ const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@
41006
41007
  class CDSCondition extends combi_1.Expression {
41007
41008
  getRunnable() {
41008
41009
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
41009
- const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, name);
41010
+ const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, _1.CDSAggregate, name);
41010
41011
  const operators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">", "LIKE", "NOT LIKE");
41011
41012
  const compare = (0, combi_1.seq)(operators, (0, combi_1.altPrio)(left, cds_integer_1.CDSInteger));
41012
41013
  const is = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
@@ -41159,7 +41160,7 @@ const cds_as_1 = __webpack_require__(/*! ./cds_as */ "./node_modules/@abaplint/c
41159
41160
  const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js");
41160
41161
  class CDSElement extends combi_1.Expression {
41161
41162
  getRunnable() {
41162
- return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
41163
+ return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, _1.CDSInteger), (0, combi_1.opt)(cds_as_1.CDSAs));
41163
41164
  }
41164
41165
  }
41165
41166
  exports.CDSElement = CDSElement;
@@ -41235,6 +41236,13 @@ class CDSFunction extends combi_1.Expression {
41235
41236
  const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41236
41237
  const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41237
41238
  const mod = (0, combi_1.seq)("MOD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41239
+ const replace = (0, combi_1.seq)("REPLACE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41240
+ const lpad = (0, combi_1.seq)("LPAD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41241
+ const rpad = (0, combi_1.seq)("RPAD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41242
+ const instr = (0, combi_1.seq)("INSTR", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41243
+ const length = (0, combi_1.seq)("LENGTH", "(", _1.CDSFunctionInput, ")");
41244
+ const ltrim = (0, combi_1.seq)("LTRIM", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41245
+ const rtrim = (0, combi_1.seq)("RTRIM", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41238
41246
  const left = (0, combi_1.seq)("LEFT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41239
41247
  const right = (0, combi_1.seq)("RIGHT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
41240
41248
  const conversionInput = (0, combi_1.seq)(_1.CDSName, "=", ">", _1.CDSFunctionInput);
@@ -41242,7 +41250,7 @@ class CDSFunction extends combi_1.Expression {
41242
41250
  const unitConversion = (0, combi_1.seq)("UNIT_CONVERSION", "(", conversionInputs, ")");
41243
41251
  const currencyConversion = (0, combi_1.seq)("CURRENCY_CONVERSION", "(", conversionInputs, ")");
41244
41252
  const decimalShift = (0, combi_1.seq)("DECIMAL_SHIFT", "(", conversionInputs, ")");
41245
- 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);
41253
+ 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, lpad, rpad, instr, length, ltrim, rtrim, replace, unitConversion, currencyConversion, decimalShift);
41246
41254
  }
41247
41255
  }
41248
41256
  exports.CDSFunction = CDSFunction;
@@ -41265,7 +41273,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
41265
41273
  class CDSFunctionInput extends combi_1.Expression {
41266
41274
  getRunnable() {
41267
41275
  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))));
41268
- const input = (0, combi_1.altPrio)(_1.CDSCast, _1.CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
41276
+ const input = (0, combi_1.altPrio)(_1.CDSCast, _1.CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, _1.CDSInteger);
41269
41277
  return input;
41270
41278
  }
41271
41279
  }
@@ -41332,7 +41340,7 @@ exports.CDSInteger = void 0;
41332
41340
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
41333
41341
  class CDSInteger extends combi_1.Expression {
41334
41342
  getRunnable() {
41335
- return (0, combi_1.regex)(/^\d+$/);
41343
+ return (0, combi_1.seq)((0, combi_1.opt)("-"), (0, combi_1.regex)(/^\d+$/));
41336
41344
  }
41337
41345
  }
41338
41346
  exports.CDSInteger = CDSInteger;
@@ -41355,7 +41363,9 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
41355
41363
  const cds_condition_1 = __webpack_require__(/*! ./cds_condition */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_condition.js");
41356
41364
  class CDSJoin extends combi_1.Expression {
41357
41365
  getRunnable() {
41358
- return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER")), "JOIN", _1.CDSSource, "ON", cds_condition_1.CDSCondition);
41366
+ const cond = (0, combi_1.seq)(_1.CDSSource, "ON", cds_condition_1.CDSCondition);
41367
+ const foo = (0, combi_1.altPrio)((0, combi_1.seq)("(", cond, ")"), cond);
41368
+ return (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("LEFT OUTER TO ONE", "LEFT OUTER", "INNER")), "JOIN", foo);
41359
41369
  }
41360
41370
  }
41361
41371
  exports.CDSJoin = CDSJoin;
@@ -53815,7 +53825,7 @@ class Registry {
53815
53825
  }
53816
53826
  static abaplintVersion() {
53817
53827
  // magic, see build script "version.sh"
53818
- return "2.113.97";
53828
+ return "2.113.99";
53819
53829
  }
53820
53830
  getDDICReferences() {
53821
53831
  return this.ddicReferences;
@@ -56061,7 +56071,9 @@ class CDSParserError {
56061
56071
  const hasError = object.hasParserError();
56062
56072
  const file = object.findSourceFile();
56063
56073
  if (hasError === true && file) {
56064
- issues.push(issue_1.Issue.atRow(file, 1, "CDS Parser error", this.getMetadata().key, this.getConfig().severity));
56074
+ const empty = file.getRaw().length === 0 ? ", empty file" : "";
56075
+ const message = "CDS Parser error" + empty;
56076
+ issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.getConfig().severity));
56065
56077
  }
56066
56078
  }
56067
56079
  return issues;
@@ -77364,6 +77376,26 @@ class VirtualPosition extends position_1.Position {
77364
77376
  const casted = p;
77365
77377
  return super.equals(this) && this.vrow === casted.vrow && this.vcol === casted.vcol;
77366
77378
  }
77379
+ isAfter(p) {
77380
+ if (p instanceof VirtualPosition) {
77381
+ if (this.getRow() > p.getRow()) {
77382
+ return true;
77383
+ }
77384
+ if (this.getRow() === p.getRow() && this.getCol() > p.getCol()) {
77385
+ return true;
77386
+ }
77387
+ if (this.getRow() === p.getRow() && this.getCol() === p.getCol() && this.vrow > p.vrow) {
77388
+ return true;
77389
+ }
77390
+ if (this.getRow() === p.getRow() && this.getCol() === p.getCol() && this.vrow === p.vrow && this.vcol > p.vcol) {
77391
+ return true;
77392
+ }
77393
+ return false;
77394
+ }
77395
+ else {
77396
+ return super.isAfter(p);
77397
+ }
77398
+ }
77367
77399
  }
77368
77400
  exports.VirtualPosition = VirtualPosition;
77369
77401
  //# sourceMappingURL=virtual_position.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.97",
3
+ "version": "2.113.99",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.97",
41
+ "@abaplint/core": "^2.113.99",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",
46
- "@types/node": "^22.10.9",
46
+ "@types/node": "^22.10.10",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.5.0",
49
49
  "chalk": "^5.4.1",
50
- "eslint": "^9.18.0",
50
+ "eslint": "^9.19.0",
51
51
  "glob": "^7.2.3",
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.17.0",