@abaplint/cli 2.113.149 → 2.113.151

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 +30 -9
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -20892,6 +20892,12 @@ class BuiltInMethod extends _identifier_1.Identifier {
20892
20892
  getAll() {
20893
20893
  throw new Error("BuiltInMethod->getAll, Method not implemented");
20894
20894
  }
20895
+ getEventName() {
20896
+ return undefined;
20897
+ }
20898
+ getEventClass() {
20899
+ return undefined;
20900
+ }
20895
20901
  getImporting() {
20896
20902
  const ret = [];
20897
20903
  for (const i in this.method.mandatory) {
@@ -39839,10 +39845,14 @@ class EventDefinition extends _identifier_1.Identifier {
39839
39845
  super(found.getFirstToken(), input.filename);
39840
39846
  this.parameters = [];
39841
39847
  this.parse(node, input);
39848
+ this.is_static = node.getFirstToken().getStr().toUpperCase() === "CLASS";
39842
39849
  }
39843
39850
  getParameters() {
39844
39851
  return this.parameters;
39845
39852
  }
39853
+ isStatic() {
39854
+ return this.is_static;
39855
+ }
39846
39856
  ///////////////
39847
39857
  parse(node, input) {
39848
39858
  for (const e of node.findAllExpressions(expressions_1.MethodParam)) {
@@ -40262,7 +40272,7 @@ const _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ "./node_m
40262
40272
  class MethodDefinition extends _identifier_1.Identifier {
40263
40273
  // todo: final flag
40264
40274
  constructor(node, visibility, input) {
40265
- var _a, _b;
40275
+ var _a, _b, _c, _d;
40266
40276
  if (!(node.get() instanceof statements_1.MethodDef)) {
40267
40277
  throw new Error("MethodDefinition, expected MethodDef as part of input node");
40268
40278
  }
@@ -40284,8 +40294,11 @@ class MethodDefinition extends _identifier_1.Identifier {
40284
40294
  }
40285
40295
  }
40286
40296
  this.eventHandler = false;
40287
- if (node.findDirectExpression(Expressions.EventHandler)) {
40297
+ const handler = node.findDirectExpression(Expressions.EventHandler);
40298
+ if (handler) {
40288
40299
  this.eventHandler = true;
40300
+ this.eventName = (_a = handler.findDirectExpression(Expressions.EventName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
40301
+ this.eventClass = (_b = handler.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
40289
40302
  }
40290
40303
  this.abstract = false;
40291
40304
  if (node.findDirectExpression(Expressions.Abstract)) {
@@ -40297,7 +40310,7 @@ class MethodDefinition extends _identifier_1.Identifier {
40297
40310
  this.static = true;
40298
40311
  }
40299
40312
  this.raising = [];
40300
- for (const r of ((_a = node.findDirectExpression(Expressions.MethodDefRaising)) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.ClassName)) || []) {
40313
+ for (const r of ((_c = node.findDirectExpression(Expressions.MethodDefRaising)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.ClassName)) || []) {
40301
40314
  const token = r.getFirstToken();
40302
40315
  const name = token.getStr();
40303
40316
  this.raising.push(name);
@@ -40313,7 +40326,7 @@ class MethodDefinition extends _identifier_1.Identifier {
40313
40326
  }
40314
40327
  }
40315
40328
  this.exceptions = [];
40316
- for (const r of ((_b = node.findDirectExpression(Expressions.MethodDefExceptions)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(Expressions.NamespaceSimpleName)) || []) {
40329
+ for (const r of ((_d = node.findDirectExpression(Expressions.MethodDefExceptions)) === null || _d === void 0 ? void 0 : _d.findAllExpressions(Expressions.NamespaceSimpleName)) || []) {
40317
40330
  const token = r.getFirstToken();
40318
40331
  const name = token.getStr();
40319
40332
  this.exceptions.push(name);
@@ -40339,6 +40352,12 @@ class MethodDefinition extends _identifier_1.Identifier {
40339
40352
  isEventHandler() {
40340
40353
  return this.eventHandler;
40341
40354
  }
40355
+ getEventName() {
40356
+ return this.eventName;
40357
+ }
40358
+ getEventClass() {
40359
+ return this.eventClass;
40360
+ }
40342
40361
  getParameters() {
40343
40362
  return this.parameters;
40344
40363
  }
@@ -53154,7 +53173,7 @@ class Table extends _abstract_object_1.AbstractObject {
53154
53173
  }
53155
53174
  if (found instanceof Types.StructureType) {
53156
53175
  if (field.GROUPNAME !== undefined) {
53157
- components.push({ name: field.GROUPNAME, type: found });
53176
+ components.push({ name: field.GROUPNAME, type: found, asInclude: true });
53158
53177
  }
53159
53178
  if (field.FIELDNAME.startsWith(".INCLU-") === false
53160
53179
  || field.FIELDNAME === ".INCLU--AP") {
@@ -54677,7 +54696,7 @@ class Registry {
54677
54696
  }
54678
54697
  static abaplintVersion() {
54679
54698
  // magic, see build script "version.sh"
54680
- return "2.113.149";
54699
+ return "2.113.151";
54681
54700
  }
54682
54701
  getDDICReferences() {
54683
54702
  return this.ddicReferences;
@@ -68453,6 +68472,7 @@ exports.MethodParameterNames = MethodParameterNames;
68453
68472
 
68454
68473
  Object.defineProperty(exports, "__esModule", ({ value: true }));
68455
68474
  exports.MixReturning = exports.MixReturningConf = void 0;
68475
+ /* eslint-disable max-len */
68456
68476
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
68457
68477
  const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
68458
68478
  const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
@@ -68472,9 +68492,10 @@ class MixReturning extends _abap_rule_1.ABAPRule {
68472
68492
  key: "mix_returning",
68473
68493
  title: "Mix of returning and exporting",
68474
68494
  shortDescription: `Checks that methods don't have a mixture of returning and exporting/changing parameters`,
68475
- // eslint-disable-next-line max-len
68476
- extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination`,
68477
- tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
68495
+ extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-either-returning-or-exporting-or-changing-but-not-a-combination
68496
+
68497
+ This syntax is not allowed on versions earlier than 740sp02, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abennews-740-abap_objects.htm#!ABAP_MODIFICATION_1@1@`,
68498
+ tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Syntax],
68478
68499
  badExample: `CLASS lcl DEFINITION.
68479
68500
  PUBLIC SECTION.
68480
68501
  METHODS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.149",
3
+ "version": "2.113.151",
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.149",
41
+ "@abaplint/core": "^2.113.151",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",