@abaplint/cli 2.102.58 → 2.102.59

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 +86 -1
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -25734,6 +25734,7 @@ const sql_for_all_entries_1 = __webpack_require__(/*! ./sql_for_all_entries */ "
25734
25734
  const _scope_type_1 = __webpack_require__(/*! ../_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
25735
25735
  const sql_source_1 = __webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js");
25736
25736
  const sql_compare_1 = __webpack_require__(/*! ./sql_compare */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_compare.js");
25737
+ const sql_order_by_1 = __webpack_require__(/*! ./sql_order_by */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_order_by.js");
25737
25738
  const isSimple = /^\w+$/;
25738
25739
  class Select {
25739
25740
  runSyntax(node, scope, filename, skipImplicitInto = false) {
@@ -25787,6 +25788,9 @@ class Select {
25787
25788
  for (const s of node.findAllExpressions(Expressions.SQLCompare)) {
25788
25789
  new sql_compare_1.SQLCompare().runSyntax(s, scope, filename, dbSources);
25789
25790
  }
25791
+ for (const s of node.findDirectExpressions(Expressions.SQLOrderBy)) {
25792
+ new sql_order_by_1.SQLOrderBy().runSyntax(s, scope, filename);
25793
+ }
25790
25794
  if (scope.getType() === _scope_type_1.ScopeType.OpenSQL) {
25791
25795
  scope.pop(node.getLastToken().getEnd());
25792
25796
  }
@@ -26446,6 +26450,31 @@ exports.SQLFrom = SQLFrom;
26446
26450
 
26447
26451
  /***/ }),
26448
26452
 
26453
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_order_by.js":
26454
+ /*!*****************************************************************************************!*\
26455
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_order_by.js ***!
26456
+ \*****************************************************************************************/
26457
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
26458
+
26459
+ "use strict";
26460
+
26461
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
26462
+ exports.SQLOrderBy = void 0;
26463
+ const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
26464
+ const dynamic_1 = __webpack_require__(/*! ./dynamic */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js");
26465
+ class SQLOrderBy {
26466
+ runSyntax(node, scope, filename) {
26467
+ const dyn = node.findDirectExpression(Expressions.Dynamic);
26468
+ if (dyn) {
26469
+ new dynamic_1.Dynamic().runSyntax(dyn, scope, filename);
26470
+ }
26471
+ }
26472
+ }
26473
+ exports.SQLOrderBy = SQLOrderBy;
26474
+ //# sourceMappingURL=sql_order_by.js.map
26475
+
26476
+ /***/ }),
26477
+
26449
26478
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js":
26450
26479
  /*!***************************************************************************************!*\
26451
26480
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js ***!
@@ -37044,6 +37073,9 @@ class InterfaceDefinition extends _identifier_1.Identifier {
37044
37073
  }
37045
37074
  }
37046
37075
  this.methodDefinitions = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);
37076
+ if (this.methodDefinitions.getByName("CONSTRUCTOR") !== undefined) {
37077
+ throw new Error("Interfaces cannot have constructor methods");
37078
+ }
37047
37079
  const events = this.node.findAllStatements(Statements.Events);
37048
37080
  for (const e of events) {
37049
37081
  this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope));
@@ -46959,6 +46991,56 @@ exports.RenameGlobalInterface = RenameGlobalInterface;
46959
46991
 
46960
46992
  /***/ }),
46961
46993
 
46994
+ /***/ "./node_modules/@abaplint/core/build/src/objects/rename/rename_message_class.js":
46995
+ /*!**************************************************************************************!*\
46996
+ !*** ./node_modules/@abaplint/core/build/src/objects/rename/rename_message_class.js ***!
46997
+ \**************************************************************************************/
46998
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
46999
+
47000
+ "use strict";
47001
+
47002
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
47003
+ exports.RenameMessageClass = void 0;
47004
+ const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
47005
+ const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/objects/index.js");
47006
+ const renamer_helper_1 = __webpack_require__(/*! ./renamer_helper */ "./node_modules/@abaplint/core/build/src/objects/rename/renamer_helper.js");
47007
+ class RenameMessageClass {
47008
+ constructor(reg) {
47009
+ this.reg = reg;
47010
+ }
47011
+ buildEdits(obj, oldName, newName) {
47012
+ if (!(obj instanceof __1.MessageClass)) {
47013
+ throw new Error("RenameMessageClass, not a message class");
47014
+ }
47015
+ let changes = [];
47016
+ const helper = new renamer_helper_1.RenamerHelper(this.reg);
47017
+ changes = changes.concat(helper.buildXMLFileEdits(obj, "ARBGB", oldName, newName));
47018
+ changes = changes.concat(helper.renameFiles(obj, oldName, newName));
47019
+ for (const message of obj.getMessages()) {
47020
+ for (const ref of this.reg.getMSAGReferences().listByMessage(obj.getName(), message.getNumber())) {
47021
+ const file = this.reg.getFileByName(ref.filename);
47022
+ if (file === undefined) {
47023
+ continue;
47024
+ }
47025
+ const rows = file.getRawRows();
47026
+ const i = ref.token.getRow() - 1;
47027
+ const index = rows[i].indexOf(oldName.toLowerCase());
47028
+ if (index >= 0) {
47029
+ const range = vscode_languageserver_types_1.Range.create(i, index, i, index + oldName.length);
47030
+ changes.push(vscode_languageserver_types_1.TextDocumentEdit.create({ uri: file.getFilename(), version: 1 }, [vscode_languageserver_types_1.TextEdit.replace(range, newName.toLowerCase())]));
47031
+ }
47032
+ }
47033
+ }
47034
+ return {
47035
+ documentChanges: changes,
47036
+ };
47037
+ }
47038
+ }
47039
+ exports.RenameMessageClass = RenameMessageClass;
47040
+ //# sourceMappingURL=rename_message_class.js.map
47041
+
47042
+ /***/ }),
47043
+
46962
47044
  /***/ "./node_modules/@abaplint/core/build/src/objects/rename/rename_table.js":
46963
47045
  /*!******************************************************************************!*\
46964
47046
  !*** ./node_modules/@abaplint/core/build/src/objects/rename/rename_table.js ***!
@@ -47051,6 +47133,7 @@ const rename_global_class_1 = __webpack_require__(/*! ./rename_global_class */ "
47051
47133
  const rename_global_interface_1 = __webpack_require__(/*! ./rename_global_interface */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_global_interface.js");
47052
47134
  const rename_table_1 = __webpack_require__(/*! ./rename_table */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_table.js");
47053
47135
  const rename_table_type_1 = __webpack_require__(/*! ./rename_table_type */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_table_type.js");
47136
+ const rename_message_class_1 = __webpack_require__(/*! ./rename_message_class */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_message_class.js");
47054
47137
  class Renamer {
47055
47138
  constructor(reg) {
47056
47139
  this.reg = reg;
@@ -47098,6 +47181,8 @@ class Renamer {
47098
47181
  return new rename_table_type_1.RenameTableType(this.reg);
47099
47182
  case "INTF":
47100
47183
  return new rename_global_interface_1.RenameGlobalInterface(this.reg);
47184
+ case "MSAG":
47185
+ return new rename_message_class_1.RenameMessageClass(this.reg);
47101
47186
  default:
47102
47187
  throw new Error("Renaming of " + type + " not yet supported");
47103
47188
  }
@@ -49306,7 +49391,7 @@ class Registry {
49306
49391
  }
49307
49392
  static abaplintVersion() {
49308
49393
  // magic, see build script "version.sh"
49309
- return "2.102.58";
49394
+ return "2.102.59";
49310
49395
  }
49311
49396
  getDDICReferences() {
49312
49397
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.58",
3
+ "version": "2.102.59",
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.102.58",
41
+ "@abaplint/core": "^2.102.59",
42
42
  "@types/chai": "^4.3.8",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.3",