@abaplint/cli 2.113.92 → 2.113.94

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 +53 -13
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -5285,9 +5285,10 @@ exports.FieldSub = void 0;
5285
5285
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
5286
5286
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
5287
5287
  const table_body_1 = __webpack_require__(/*! ./table_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js");
5288
+ const field_length_1 = __webpack_require__(/*! ./field_length */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_length.js");
5288
5289
  class FieldSub extends combi_1.Expression {
5289
5290
  getRunnable() {
5290
- const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?&?(\/\w+\/)?[a-zA-Z_%$\?][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(table_body_1.TableBody));
5291
+ const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?&?(\/\w+\/)?[a-zA-Z_%$\?][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(field_length_1.FieldLength), (0, combi_1.opt)(table_body_1.TableBody));
5291
5292
  return ret;
5292
5293
  }
5293
5294
  }
@@ -8451,7 +8452,7 @@ const integer_1 = __webpack_require__(/*! ./integer */ "./node_modules/@abaplint
8451
8452
  const sql_function_input_1 = __webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js");
8452
8453
  class SQLFunction extends combi_1.Expression {
8453
8454
  getRunnable() {
8454
- const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.seq)("DEC", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, ",", integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), "FLTP", "NUMC", "INT8");
8455
+ const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), (0, combi_1.seq)("DEC", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, ",", integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.seq)("NUMC", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), "FLTP", "INT2", "INT8");
8455
8456
  const commaParam = (0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput);
8456
8457
  // note: the function names are not keywords, they are usually in lower case
8457
8458
  const abs = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^abs$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
@@ -9464,7 +9465,7 @@ class TypeTable extends combi_1.Expression {
9464
9465
  const rangeLike = (0, combi_1.seq)("RANGE OF", field_chain_1.FieldChain, (0, combi_1.optPrio)(header), (0, combi_1.optPrio)(initial), (0, combi_1.optPrio)("VALUE IS INITIAL"));
9465
9466
  // a maximum of 15 secondary table keys can be defined
9466
9467
  // "WITH" is not allowed as a field name in keys
9467
- const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial)))));
9468
+ const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial))), (0, combi_1.optPrio)("VALUE IS INITIAL")));
9468
9469
  const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
9469
9470
  const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "REPORTED EARLY", "FAILED EARLY", "FAILED", "LOCK", "DETERMINATION", "READ RESULT", "UPDATE"), (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation)));
9470
9471
  const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
@@ -11882,7 +11883,8 @@ class DeleteDatabase {
11882
11883
  getMatcher() {
11883
11884
  const where = (0, combi_1.seq)("WHERE", (0, combi_1.altPrio)(expressions_1.SQLCond, expressions_1.Dynamic));
11884
11885
  const from = (0, combi_1.seq)("FROM", expressions_1.DatabaseTable, (0, combi_1.optPrio)(sql_client_1.SQLClient), (0, combi_1.optPrio)(expressions_1.DatabaseConnection), (0, combi_1.opt)(where));
11885
- const table = (0, combi_1.seq)(expressions_1.DatabaseTable, (0, combi_1.optPrio)(sql_client_1.SQLClient), (0, combi_1.optPrio)(expressions_1.DatabaseConnection), "FROM", (0, combi_1.opt)("TABLE"), expressions_1.SQLSourceSimple);
11886
+ const fromSomething = (0, combi_1.seq)("FROM", (0, combi_1.opt)("TABLE"), expressions_1.SQLSourceSimple);
11887
+ const table = (0, combi_1.seq)(expressions_1.DatabaseTable, (0, combi_1.optPrio)(sql_client_1.SQLClient), (0, combi_1.optPrio)(expressions_1.DatabaseConnection), (0, combi_1.optPrio)(fromSomething));
11886
11888
  const ret = (0, combi_1.seq)("DELETE", (0, combi_1.altPrio)(from, table));
11887
11889
  return ret;
11888
11890
  }
@@ -11958,13 +11960,13 @@ class DeleteInternal {
11958
11960
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
11959
11961
  const keyName = (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic);
11960
11962
  const using = (0, combi_1.seq)("USING KEY", keyName);
11961
- const from = (0, combi_1.optPrio)((0, combi_1.seq)("FROM", expressions_1.Source));
11962
- const fromTo = (0, combi_1.seq)(from, (0, combi_1.optPrio)((0, combi_1.seq)("TO", expressions_1.Source)));
11963
+ const from = (0, combi_1.seq)("FROM", expressions_1.Source);
11964
+ const fromTo = (0, combi_1.seq)((0, combi_1.optPrio)(from), (0, combi_1.optPrio)((0, combi_1.seq)("TO", expressions_1.Source)));
11963
11965
  const where = (0, combi_1.seq)("WHERE", (0, combi_1.alt)(expressions_1.ComponentCond, expressions_1.Dynamic));
11964
11966
  const key = (0, combi_1.seq)("WITH TABLE KEY", (0, combi_1.opt)((0, combi_1.seq)(keyName, "COMPONENTS")), (0, combi_1.plus)(expressions_1.ComponentCompare));
11965
- const table = (0, combi_1.seq)("TABLE", expressions_1.Target, (0, combi_1.alt)((0, combi_1.per)(index, using), from, key));
11967
+ const table = (0, combi_1.seq)("TABLE", expressions_1.Target, (0, combi_1.alt)((0, combi_1.per)(index, using), (0, combi_1.seq)((0, combi_1.optPrio)(from), (0, combi_1.optPrio)(using)), key));
11966
11968
  const other = (0, combi_1.seq)(expressions_1.Target, (0, combi_1.alt)((0, combi_1.per)(index, using), fromTo, key), (0, combi_1.opt)(where));
11967
- const f = (0, combi_1.seq)(expressions_1.FieldSub, (0, combi_1.optPrio)(expressions_1.FieldOffset), (0, combi_1.optPrio)(expressions_1.FieldLength));
11969
+ const f = (0, combi_1.seq)(expressions_1.SimpleFieldChain2, (0, combi_1.optPrio)(expressions_1.FieldOffset), (0, combi_1.optPrio)(expressions_1.FieldLength));
11968
11970
  const adjacent = (0, combi_1.seq)("ADJACENT DUPLICATES FROM", expressions_1.Target, (0, combi_1.optPrio)(using), (0, combi_1.opt)((0, combi_1.seq)("COMPARING", (0, combi_1.altPrio)("ALL FIELDS", (0, combi_1.plus)((0, combi_1.altPrio)(f, expressions_1.Dynamic))))), (0, combi_1.optPrio)(using));
11969
11971
  return (0, combi_1.seq)("DELETE", (0, combi_1.alt)(table, adjacent, other));
11970
11972
  }
@@ -40657,6 +40659,9 @@ class CDSParser {
40657
40659
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
40658
40660
  res = combi_1.Combi.run(new Expressions.CDSDefineCustom(), tokens, version_1.defaultVersion);
40659
40661
  }
40662
+ if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
40663
+ res = combi_1.Combi.run(new Expressions.CDSDefineTableFunction(), tokens, version_1.defaultVersion);
40664
+ }
40660
40665
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
40661
40666
  res = combi_1.Combi.run(new Expressions.CDSExtendView(), tokens, version_1.defaultVersion);
40662
40667
  }
@@ -41001,7 +41006,7 @@ class CDSCondition extends combi_1.Expression {
41001
41006
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
41002
41007
  const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, name);
41003
41008
  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");
41004
- const compare = (0, combi_1.seq)(left, operators, (0, combi_1.alt)(left, cds_integer_1.CDSInteger));
41009
+ const compare = (0, combi_1.seq)(left, operators, (0, combi_1.altPrio)(left, cds_integer_1.CDSInteger));
41005
41010
  const is = (0, combi_1.seq)(left, "IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
41006
41011
  const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)(compare, is));
41007
41012
  const paren = (0, combi_1.seq)("(", CDSCondition, ")");
@@ -41085,6 +41090,30 @@ exports.CDSDefineProjection = CDSDefineProjection;
41085
41090
 
41086
41091
  /***/ }),
41087
41092
 
41093
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_function.js":
41094
+ /*!********************************************************************************************!*\
41095
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_function.js ***!
41096
+ \********************************************************************************************/
41097
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
41098
+
41099
+ "use strict";
41100
+
41101
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
41102
+ exports.CDSDefineTableFunction = void 0;
41103
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
41104
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
41105
+ const cds_name_1 = __webpack_require__(/*! ./cds_name */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js");
41106
+ class CDSDefineTableFunction extends combi_1.Expression {
41107
+ getRunnable() {
41108
+ const methodName = (0, combi_1.seq)(cds_name_1.CDSName, "=", ">", cds_name_1.CDSName);
41109
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE TABLE FUNCTION"), cds_name_1.CDSName, _1.CDSWithParameters, (0, combi_1.str)("RETURNS {"), (0, combi_1.plus)((0, combi_1.seq)(cds_name_1.CDSName, ":", _1.CDSType, ";")), (0, combi_1.str)("} IMPLEMENTED BY METHOD"), methodName, (0, combi_1.opt)(";"));
41110
+ }
41111
+ }
41112
+ exports.CDSDefineTableFunction = CDSDefineTableFunction;
41113
+ //# sourceMappingURL=cds_define_table_function.js.map
41114
+
41115
+ /***/ }),
41116
+
41088
41117
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js":
41089
41118
  /*!**********************************************************************************!*\
41090
41119
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js ***!
@@ -41345,7 +41374,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
41345
41374
  class CDSName extends combi_1.Expression {
41346
41375
  getRunnable() {
41347
41376
  const pre = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w_]+$/), "/");
41348
- return (0, combi_1.seq)((0, combi_1.opt)(":"), (0, combi_1.opt)(pre), (0, combi_1.regex)(/^\$?#?[\w_]+$/));
41377
+ return (0, combi_1.seq)((0, combi_1.optPrio)(":"), (0, combi_1.optPrio)(pre), (0, combi_1.regex)(/^\$?#?[\w_]+$/));
41349
41378
  }
41350
41379
  }
41351
41380
  exports.CDSName = CDSName;
@@ -41648,11 +41677,12 @@ __exportStar(__webpack_require__(/*! ./cds_condition */ "./node_modules/@abaplin
41648
41677
  __exportStar(__webpack_require__(/*! ./cds_define_abstract */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_abstract.js"), exports);
41649
41678
  __exportStar(__webpack_require__(/*! ./cds_define_custom */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js"), exports);
41650
41679
  __exportStar(__webpack_require__(/*! ./cds_define_projection */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js"), exports);
41680
+ __exportStar(__webpack_require__(/*! ./cds_define_table_function */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_function.js"), exports);
41651
41681
  __exportStar(__webpack_require__(/*! ./cds_define_view */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js"), exports);
41652
41682
  __exportStar(__webpack_require__(/*! ./cds_element */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js"), exports);
41653
41683
  __exportStar(__webpack_require__(/*! ./cds_extend_view */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_extend_view.js"), exports);
41654
- __exportStar(__webpack_require__(/*! ./cds_function */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js"), exports);
41655
41684
  __exportStar(__webpack_require__(/*! ./cds_function_input */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function_input.js"), exports);
41685
+ __exportStar(__webpack_require__(/*! ./cds_function */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_function.js"), exports);
41656
41686
  __exportStar(__webpack_require__(/*! ./cds_group_by */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_group_by.js"), exports);
41657
41687
  __exportStar(__webpack_require__(/*! ./cds_having */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_having.js"), exports);
41658
41688
  __exportStar(__webpack_require__(/*! ./cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js"), exports);
@@ -44251,6 +44281,7 @@ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./nod
44251
44281
  const dump_scope_1 = __webpack_require__(/*! ./dump_scope */ "./node_modules/@abaplint/core/build/src/lsp/dump_scope.js");
44252
44282
  const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
44253
44283
  const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
44284
+ const cds_lexer_1 = __webpack_require__(/*! ../cds/cds_lexer */ "./node_modules/@abaplint/core/build/src/cds/cds_lexer.js");
44254
44285
  class Help {
44255
44286
  static find(reg, textDocument, position) {
44256
44287
  const abapFile = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
@@ -44270,7 +44301,7 @@ class Help {
44270
44301
  /////////////////////////////////////////////////
44271
44302
  static dumpDDLS(obj, reg) {
44272
44303
  let content = "";
44273
- content += "<h1>" + obj.getType + " " + obj.getName() + "</h1>\n";
44304
+ content += "<h1>" + obj.getType() + " " + obj.getName() + "</h1>\n";
44274
44305
  content += obj.getDescription() + "\n";
44275
44306
  content += obj.getParsingIssues().map(i => i.getMessage()).join("<br>\n");
44276
44307
  content += `<hr>\n`;
@@ -44280,6 +44311,15 @@ class Help {
44280
44311
  content += `<hr>\n`;
44281
44312
  content += `<pre>` + obj.parseType(reg).toText(0) + "</pre>\n";
44282
44313
  content += `<hr>\n`;
44314
+ const file = obj.findSourceFile();
44315
+ if (file) {
44316
+ const tokens = cds_lexer_1.CDSLexer.run(file);
44317
+ content += `<h3>Tokens</h3>\n<pre>\n`;
44318
+ for (const t of tokens) {
44319
+ content += JSON.stringify(t) + "\n";
44320
+ }
44321
+ content += `</pre>\n`;
44322
+ }
44283
44323
  return content;
44284
44324
  }
44285
44325
  static dumpABAP(file, reg, textDocument, position) {
@@ -53771,7 +53811,7 @@ class Registry {
53771
53811
  }
53772
53812
  static abaplintVersion() {
53773
53813
  // magic, see build script "version.sh"
53774
- return "2.113.92";
53814
+ return "2.113.94";
53775
53815
  }
53776
53816
  getDDICReferences() {
53777
53817
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.92",
3
+ "version": "2.113.94",
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.92",
41
+ "@abaplint/core": "^2.113.94",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",