@abaplint/cli 2.112.3 → 2.112.5

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 +90 -144
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -8326,20 +8326,21 @@ class SQLFunction extends combi_1.Expression {
8326
8326
  const param = (0, combi_1.altPrio)(SQLFunction, sql_aggregation_1.SQLAggregation, sql_field_name_1.SQLFieldName, sql_alias_field_1.SQLAliasField, constant_1.Constant, at);
8327
8327
  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");
8328
8328
  const commaParam = (0, combi_1.seq)(",", param);
8329
- const abs = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("abs", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8330
- const cast = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("cast", (0, combi_1.tok)(tokens_1.ParenLeftW), param, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
8331
- const ceil = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("ceil", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8332
- const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("coalesce", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.optPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
8333
- const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("concat", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8334
- const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("div", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8335
- const floor = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("floor", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8336
- const length = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("length", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8337
- const lower = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("lower", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8338
- const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("mod", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8339
- const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("replace", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8340
- const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("round", (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8341
- const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("upper", (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8342
- const uuid = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("uuid", (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
8329
+ // note: the function names are not keywords, they are usually in lower case
8330
+ 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), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8331
+ const cast = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^cast$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
8332
+ const ceil = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^ceil$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8333
+ const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^coalesce$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.optPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
8334
+ const concat = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^concat$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8335
+ const div = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^div$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8336
+ const floor = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^floor$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8337
+ const length = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^length$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8338
+ const lower = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^lower$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8339
+ const mod = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^mod$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8340
+ const replace = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^replace$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8341
+ const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^round$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8342
+ const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^upper$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), param, (0, combi_1.tok)(tokens_1.WParenRightW)));
8343
+ const uuid = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)((0, combi_1.regex)(/^uuid$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
8343
8344
  return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round);
8344
8345
  }
8345
8346
  }
@@ -21425,6 +21426,7 @@ class CurrentScope {
21425
21426
  }
21426
21427
  const upper = name.toUpperCase();
21427
21428
  if (this.current.getData().vars[upper] !== undefined) {
21429
+ // console.dir(new Error().stack);
21428
21430
  throw new Error(`Variable name "${name}" already defined`);
21429
21431
  }
21430
21432
  else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
@@ -21814,7 +21816,7 @@ class ObjectOriented {
21814
21816
  return ret;
21815
21817
  }
21816
21818
  addAliasedAttributes(classDefinition) {
21817
- for (const alias of classDefinition.getAliases().getAll()) {
21819
+ for (const alias of classDefinition.getAliases()) {
21818
21820
  const comp = alias.getComponent();
21819
21821
  const idef = this.scope.findInterfaceDefinition(comp.split("~")[0]);
21820
21822
  if (idef) {
@@ -21832,18 +21834,6 @@ class ObjectOriented {
21832
21834
  }
21833
21835
  }
21834
21836
  }
21835
- addAliasedTypes(aliases) {
21836
- for (const alias of aliases.getAll()) {
21837
- const comp = alias.getComponent();
21838
- const idef = this.scope.findInterfaceDefinition(comp.split("~")[0]);
21839
- if (idef) {
21840
- const found = idef.getTypeDefinitions().getByName(comp.split("~")[1]);
21841
- if (found) {
21842
- this.scope.addTypeNamed(alias.getName(), found);
21843
- }
21844
- }
21845
- }
21846
- }
21847
21837
  findMethodInInterface(interfaceName, methodName) {
21848
21838
  const idef = this.scope.findInterfaceDefinition(interfaceName);
21849
21839
  if (idef) {
@@ -21858,7 +21848,7 @@ class ObjectOriented {
21858
21848
  return undefined;
21859
21849
  }
21860
21850
  findMethodViaAlias(methodName, def) {
21861
- for (const a of def.getAliases().getAll()) {
21851
+ for (const a of def.getAliases()) {
21862
21852
  if (a.getName().toUpperCase() === methodName.toUpperCase()) {
21863
21853
  const comp = a.getComponent();
21864
21854
  const res = this.findMethodInInterface(comp.split("~")[0], comp.split("~")[1]);
@@ -21901,7 +21891,6 @@ class ObjectOriented {
21901
21891
  return ret;
21902
21892
  }
21903
21893
  searchEvent(def, name) {
21904
- var _a;
21905
21894
  if (def === undefined || name === undefined) {
21906
21895
  return undefined;
21907
21896
  }
@@ -21909,7 +21898,7 @@ class ObjectOriented {
21909
21898
  if (found) {
21910
21899
  return found;
21911
21900
  }
21912
- for (const a of ((_a = def.getAliases()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
21901
+ for (const a of def.getAliases() || []) {
21913
21902
  if (a.getName().toUpperCase() === name.toUpperCase()) {
21914
21903
  const comp = a.getComponent();
21915
21904
  const res = this.searchEvent(this.scope.findObjectDefinition(comp.split("~")[0]), comp.split("~")[1]);
@@ -21926,7 +21915,6 @@ class ObjectOriented {
21926
21915
  }
21927
21916
  // search in via super class, interfaces and aliases
21928
21917
  searchAttributeName(def, name) {
21929
- var _a;
21930
21918
  if (def === undefined || name === undefined) {
21931
21919
  return undefined;
21932
21920
  }
@@ -21936,7 +21924,7 @@ class ObjectOriented {
21936
21924
  return a;
21937
21925
  }
21938
21926
  }
21939
- for (const a of ((_a = def.getAliases()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
21927
+ for (const a of def.getAliases() || []) {
21940
21928
  if (a.getName().toUpperCase() === upper) {
21941
21929
  const comp = a.getComponent();
21942
21930
  const res = this.searchAttributeName(this.scope.findObjectDefinition(comp.split("~")[0]), comp.split("~")[1]);
@@ -21989,7 +21977,7 @@ class ObjectOriented {
21989
21977
  return a;
21990
21978
  }
21991
21979
  }
21992
- for (const a of def.getAliases().getAll()) {
21980
+ for (const a of def.getAliases()) {
21993
21981
  if (a.getName().toUpperCase() === upper) {
21994
21982
  const comp = a.getComponent();
21995
21983
  const res = this.searchConstantName(this.scope.findObjectDefinition(comp.split("~")[0]), comp.split("~")[1]);
@@ -36478,77 +36466,6 @@ exports.Alias = Alias;
36478
36466
 
36479
36467
  /***/ }),
36480
36468
 
36481
- /***/ "./node_modules/@abaplint/core/build/src/abap/types/aliases.js":
36482
- /*!*********************************************************************!*\
36483
- !*** ./node_modules/@abaplint/core/build/src/abap/types/aliases.js ***!
36484
- \*********************************************************************/
36485
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
36486
-
36487
- "use strict";
36488
-
36489
- Object.defineProperty(exports, "__esModule", ({ value: true }));
36490
- exports.Aliases = void 0;
36491
- const alias_1 = __webpack_require__(/*! ./alias */ "./node_modules/@abaplint/core/build/src/abap/types/alias.js");
36492
- const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
36493
- const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
36494
- const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
36495
- const visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
36496
- const _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
36497
- class Aliases {
36498
- constructor(node, filename, scope) {
36499
- this.aliases = [];
36500
- this.filename = filename;
36501
- this.parse(node, scope, filename);
36502
- }
36503
- getAll() {
36504
- return this.aliases;
36505
- }
36506
- getByName(name) {
36507
- for (const a of this.aliases) {
36508
- if (a.getName().toLowerCase() === name.toLowerCase()) {
36509
- return a;
36510
- }
36511
- }
36512
- return undefined;
36513
- }
36514
- /////////////////////////
36515
- parse(node, scope, filename) {
36516
- const cdef = node.findFirstStructure(Structures.ClassDefinition);
36517
- if (cdef) {
36518
- this.parseSection(cdef.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public, scope, filename);
36519
- this.parseSection(cdef.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private, scope, filename);
36520
- this.parseSection(cdef.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected, scope, filename);
36521
- }
36522
- const idef = node.findFirstStructure(Structures.Interface);
36523
- if (idef) {
36524
- this.parseSection(idef, visibility_1.Visibility.Public, scope, filename);
36525
- }
36526
- }
36527
- parseSection(node, visibility, scope, filename) {
36528
- if (!node) {
36529
- return;
36530
- }
36531
- const list = node.findAllStatements(Statements.Aliases);
36532
- for (const a of list) {
36533
- const name = a.findFirstExpression(Expressions.SimpleName).getFirstToken();
36534
- const compToken = a.findFirstExpression(Expressions.Field).getFirstToken();
36535
- const compName = compToken.getStr();
36536
- this.aliases.push(new alias_1.Alias(name, visibility, compName, this.filename));
36537
- if (compName.includes("~")) {
36538
- const name = compName.split("~")[0];
36539
- const idef = scope.findInterfaceDefinition(name);
36540
- if (idef) {
36541
- scope.addReference(compToken, idef, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: "INTF" });
36542
- }
36543
- }
36544
- }
36545
- }
36546
- }
36547
- exports.Aliases = Aliases;
36548
- //# sourceMappingURL=aliases.js.map
36549
-
36550
- /***/ }),
36551
-
36552
36469
  /***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js":
36553
36470
  /*!**********************************************************************************!*\
36554
36471
  !*** ./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js ***!
@@ -38018,6 +37935,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
38018
37935
  exports.Attributes = void 0;
38019
37936
  const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
38020
37937
  const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
37938
+ const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
38021
37939
  const class_attribute_1 = __webpack_require__(/*! ./class_attribute */ "./node_modules/@abaplint/core/build/src/abap/types/class_attribute.js");
38022
37940
  const class_constant_1 = __webpack_require__(/*! ./class_constant */ "./node_modules/@abaplint/core/build/src/abap/types/class_constant.js");
38023
37941
  const nodes_1 = __webpack_require__(/*! ../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
@@ -38032,13 +37950,16 @@ const constants_1 = __webpack_require__(/*! ../5_syntax/structures/constants */
38032
37950
  const type_definitions_1 = __webpack_require__(/*! ./type_definitions */ "./node_modules/@abaplint/core/build/src/abap/types/type_definitions.js");
38033
37951
  const types_1 = __webpack_require__(/*! ../5_syntax/structures/types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/structures/types.js");
38034
37952
  const type_1 = __webpack_require__(/*! ../5_syntax/statements/type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/type.js");
37953
+ const _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
37954
+ const alias_1 = __webpack_require__(/*! ./alias */ "./node_modules/@abaplint/core/build/src/abap/types/alias.js");
38035
37955
  class Attributes {
38036
37956
  constructor(node, input) {
38037
37957
  this.static = [];
38038
37958
  this.instance = [];
38039
37959
  this.constants = [];
38040
- this.filename = input.filename;
37960
+ this.aliases = [];
38041
37961
  this.tlist = [];
37962
+ this.filename = input.filename;
38042
37963
  this.parse(node, input);
38043
37964
  this.types = new type_definitions_1.TypeDefinitions(this.tlist);
38044
37965
  }
@@ -38048,6 +37969,9 @@ class Attributes {
38048
37969
  getStatic() {
38049
37970
  return this.static;
38050
37971
  }
37972
+ getAliases() {
37973
+ return this.aliases;
37974
+ }
38051
37975
  getAll() {
38052
37976
  let res = [];
38053
37977
  res = res.concat(this.static);
@@ -38186,6 +38110,9 @@ class Attributes {
38186
38110
  else if (ctyp instanceof Statements.ClassData) {
38187
38111
  this.static.push(this.parseAttribute(c, visibility, input));
38188
38112
  }
38113
+ else if (ctyp instanceof Statements.Aliases) {
38114
+ this.parseAlias(c, visibility, input);
38115
+ }
38189
38116
  else if (ctyp instanceof Statements.Constant) {
38190
38117
  const found = new constant_1.Constant().runSyntax(c, input);
38191
38118
  if (found) {
@@ -38204,6 +38131,27 @@ class Attributes {
38204
38131
  }
38205
38132
  }
38206
38133
  }
38134
+ parseAlias(node, visibility, input) {
38135
+ const aliasName = node.findFirstExpression(Expressions.SimpleName).getFirstToken();
38136
+ const compToken = node.findFirstExpression(Expressions.Field).getFirstToken();
38137
+ const compName = compToken.getStr();
38138
+ this.aliases.push(new alias_1.Alias(aliasName, visibility, compName, this.filename));
38139
+ if (compName.includes("~")) {
38140
+ const name = compName.split("~")[0];
38141
+ const idef = input.scope.findInterfaceDefinition(name);
38142
+ if (idef) {
38143
+ input.scope.addReference(compToken, idef, _reference_1.ReferenceType.ObjectOrientedReference, input.filename, { ooName: name.toUpperCase(), ooType: "INTF" });
38144
+ const foundType = idef.getTypeDefinitions().getByName(compName.split("~")[1]);
38145
+ if (foundType) {
38146
+ input.scope.addTypeNamed(aliasName.getStr(), foundType);
38147
+ }
38148
+ const foundAttribute = idef.getAttributes().findByName(compName.split("~")[1]);
38149
+ if (foundAttribute) {
38150
+ input.scope.addNamedIdentifier(aliasName.getStr(), foundAttribute);
38151
+ }
38152
+ }
38153
+ }
38154
+ }
38207
38155
  parseAttribute(node, visibility, input) {
38208
38156
  let found = undefined;
38209
38157
  const s = node.get();
@@ -38270,7 +38218,6 @@ const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node
38270
38218
  const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
38271
38219
  const class_attributes_1 = __webpack_require__(/*! ./class_attributes */ "./node_modules/@abaplint/core/build/src/abap/types/class_attributes.js");
38272
38220
  const _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
38273
- const aliases_1 = __webpack_require__(/*! ./aliases */ "./node_modules/@abaplint/core/build/src/abap/types/aliases.js");
38274
38221
  const _scope_type_1 = __webpack_require__(/*! ../5_syntax/_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
38275
38222
  const event_definition_1 = __webpack_require__(/*! ./event_definition */ "./node_modules/@abaplint/core/build/src/abap/types/event_definition.js");
38276
38223
  const visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
@@ -38295,9 +38242,9 @@ class ClassDefinition extends _identifier_1.Identifier {
38295
38242
  this.parse(input, node);
38296
38243
  const helper = new _object_oriented_1.ObjectOriented(input.scope);
38297
38244
  helper.fromSuperClassesAndInterfaces(this);
38298
- helper.addAliasedTypes(this.aliases);
38299
38245
  this.attributes = new class_attributes_1.Attributes(node, input);
38300
38246
  this.types = this.attributes.getTypes();
38247
+ this.aliases = this.attributes.getAliases();
38301
38248
  const events = node.findAllStatements(Statements.Events);
38302
38249
  for (const e of events) {
38303
38250
  this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, input)); // todo, all these are not Public
@@ -38378,7 +38325,7 @@ class ClassDefinition extends _identifier_1.Identifier {
38378
38325
  }
38379
38326
  names.add(name);
38380
38327
  }
38381
- for (const a of (cdef === null || cdef === void 0 ? void 0 : cdef.getAliases().getAll()) || []) {
38328
+ for (const a of (cdef === null || cdef === void 0 ? void 0 : cdef.getAliases()) || []) {
38382
38329
  names.add(a.getName().toUpperCase());
38383
38330
  }
38384
38331
  sup = cdef === null || cdef === void 0 ? void 0 : cdef.getSuperClass();
@@ -38433,7 +38380,6 @@ class ClassDefinition extends _identifier_1.Identifier {
38433
38380
  input.scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedUnknownReference, input.filename, { ooName: name.toUpperCase(), ooType: "INTF" });
38434
38381
  }
38435
38382
  }
38436
- this.aliases = new aliases_1.Aliases(inputNode, this.filename, input.scope);
38437
38383
  }
38438
38384
  }
38439
38385
  exports.ClassDefinition = ClassDefinition;
@@ -38783,11 +38729,7 @@ const visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */
38783
38729
  const _scope_type_1 = __webpack_require__(/*! ../5_syntax/_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
38784
38730
  const event_definition_1 = __webpack_require__(/*! ./event_definition */ "./node_modules/@abaplint/core/build/src/abap/types/event_definition.js");
38785
38731
  const method_definitions_1 = __webpack_require__(/*! ./method_definitions */ "./node_modules/@abaplint/core/build/src/abap/types/method_definitions.js");
38786
- const aliases_1 = __webpack_require__(/*! ./aliases */ "./node_modules/@abaplint/core/build/src/abap/types/aliases.js");
38787
38732
  const _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
38788
- const class_constant_1 = __webpack_require__(/*! ./class_constant */ "./node_modules/@abaplint/core/build/src/abap/types/class_constant.js");
38789
- const _typed_identifier_1 = __webpack_require__(/*! ./_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
38790
- const tokens_1 = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
38791
38733
  class InterfaceDefinition extends _identifier_1.Identifier {
38792
38734
  constructor(node, input) {
38793
38735
  if (!(node.get() instanceof Structures.Interface)) {
@@ -38831,37 +38773,8 @@ class InterfaceDefinition extends _identifier_1.Identifier {
38831
38773
  return this.methodDefinitions;
38832
38774
  }
38833
38775
  /////////////////
38834
- parse(input, node) {
38776
+ checkInterfacesExists(input, node) {
38835
38777
  var _a;
38836
- // todo, proper sequencing, the statements should be processed line by line
38837
- this.attributes = new class_attributes_1.Attributes(node, input);
38838
- this.typeDefinitions = this.attributes.getTypes();
38839
- this.aliases = new aliases_1.Aliases(node, this.filename, input.scope);
38840
- // todo, cleanup aliases, vs "object_oriented.ts" vs "class_implementation.ts"
38841
- // this adds the aliased types to scope?
38842
- for (const a of this.aliases.getAll()) {
38843
- const [objName, fieldName] = a.getComponent().split("~");
38844
- const idef = input.scope.findInterfaceDefinition(objName);
38845
- if (idef) {
38846
- const foundType = idef.getTypeDefinitions().getByName(fieldName);
38847
- if (foundType) {
38848
- input.scope.addTypeNamed(a.getName(), foundType);
38849
- }
38850
- else {
38851
- const foundField = idef.getAttributes().findByName(fieldName);
38852
- if (foundField && foundField instanceof class_constant_1.ClassConstant) {
38853
- const token = new tokens_1.Identifier(a.getStart(), a.getName());
38854
- const id = new _typed_identifier_1.TypedIdentifier(token, input.filename, foundField.getType());
38855
- const constant = new class_constant_1.ClassConstant(id, visibility_1.Visibility.Public, foundField.getValue());
38856
- input.scope.addIdentifier(constant);
38857
- }
38858
- }
38859
- }
38860
- }
38861
- const events = node.findAllStatements(Statements.Events);
38862
- for (const e of events) {
38863
- this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, input));
38864
- }
38865
38778
  for (const i of node.findAllStatements(Statements.InterfaceDef)) {
38866
38779
  const token = (_a = i.findDirectExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
38867
38780
  const name = token === null || token === void 0 ? void 0 : token.getStr();
@@ -38879,6 +38792,39 @@ class InterfaceDefinition extends _identifier_1.Identifier {
38879
38792
  }
38880
38793
  }
38881
38794
  }
38795
+ }
38796
+ parse(input, node) {
38797
+ this.checkInterfacesExists(input, node);
38798
+ // todo, proper sequencing, the statements should be processed line by line
38799
+ this.attributes = new class_attributes_1.Attributes(node, input);
38800
+ this.typeDefinitions = this.attributes.getTypes();
38801
+ this.aliases = this.attributes.getAliases();
38802
+ // todo, cleanup aliases, vs "object_oriented.ts" vs "class_implementation.ts"
38803
+ // this adds the aliased types to scope?
38804
+ /*
38805
+ for (const a of this.aliases) {
38806
+ const [objName, fieldName] = a.getComponent().split("~");
38807
+ const idef = input.scope.findInterfaceDefinition(objName);
38808
+ if (idef) {
38809
+ const foundType = idef.getTypeDefinitions().getByName(fieldName);
38810
+ if (foundType) {
38811
+ input.scope.addTypeNamed(a.getName(), foundType);
38812
+ } else {
38813
+ const foundField = idef.getAttributes().findByName(fieldName);
38814
+ if (foundField && foundField instanceof ClassConstant) {
38815
+ const token = new TokenIdentifier(a.getStart(), a.getName());
38816
+ const id = new TypedIdentifier(token, input.filename, foundField.getType());
38817
+ const constant = new ClassConstant(id, Visibility.Public, foundField.getValue());
38818
+ input.scope.addIdentifier(constant);
38819
+ }
38820
+ }
38821
+ }
38822
+ }
38823
+ */
38824
+ const events = node.findAllStatements(Statements.Events);
38825
+ for (const e of events) {
38826
+ this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, input));
38827
+ }
38882
38828
  this.methodDefinitions = new method_definitions_1.MethodDefinitions(node, input);
38883
38829
  if (this.methodDefinitions.getByName("CONSTRUCTOR") !== undefined) {
38884
38830
  throw new Error("Interfaces cannot have constructor methods");
@@ -52404,7 +52350,7 @@ class Registry {
52404
52350
  }
52405
52351
  static abaplintVersion() {
52406
52352
  // magic, see build script "version.sh"
52407
- return "2.112.3";
52353
+ return "2.112.5";
52408
52354
  }
52409
52355
  getDDICReferences() {
52410
52356
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.112.3",
3
+ "version": "2.112.5",
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.112.3",
41
+ "@abaplint/core": "^2.112.5",
42
42
  "@types/chai": "^4.3.16",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
@@ -52,7 +52,7 @@
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.9.3",
54
54
  "minimist": "^1.2.8",
55
- "mocha": "^10.6.0",
55
+ "mocha": "^10.7.0",
56
56
  "progress": "^2.0.3",
57
57
  "typescript": "^5.5.3",
58
58
  "webpack": "^5.93.0",