@abaplint/transpiler-cli 2.13.1 → 2.13.2

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/bundle.js +354 -18
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -14070,7 +14070,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
14070
14070
  const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
14071
14071
  class MethodDef {
14072
14072
  getMatcher() {
14073
- const def = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("DEFAULT", (0, combi_1.altPrio)("FAIL", "IGNORE")));
14073
+ const def = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("DEFAULT", (0, combi_1.altPrio)("FAIL", "IGNORE")), version_1.Version.OpenABAP);
14074
14074
  const parameters = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("FINAL", def, expressions_1.Abstract)), (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefChanging), (0, combi_1.optPrio)(expressions_1.MethodDefReturning), (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));
14075
14075
  const testing = (0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), "FOR TESTING", (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));
14076
14076
  const result = (0, combi_1.seq)("RESULT", expressions_1.MethodParamName);
@@ -15217,7 +15217,9 @@ class ReadTable {
15217
15217
  const key = (0, combi_1.seq)((0, combi_1.altPrio)("WITH KEY", "WITH TABLE KEY"), (0, combi_1.alt)(expressions_1.ComponentCompareSimple, components, (0, combi_1.seq)((0, combi_1.optPrio)("="), expressions_1.Source)));
15218
15218
  const using = (0, combi_1.seq)("USING KEY", (0, combi_1.alt)(expressions_1.Field, expressions_1.Dynamic));
15219
15219
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15220
- const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", (0, combi_1.seq)("TRANSPORTING", (0, combi_1.altPrio)("ALL FIELDS", "NO FIELDS", transporting_fields_1.TransportingFields)), "BINARY SEARCH");
15220
+ const transporting = (0, combi_1.seq)("TRANSPORTING", (0, combi_1.altPrio)("ALL FIELDS", "NO FIELDS", transporting_fields_1.TransportingFields));
15221
+ const common = [expressions_1.ReadTableTarget, comparing, "CASTING", transporting, "BINARY SEARCH"];
15222
+ const perm = (0, combi_1.alt)((0, combi_1.per)((0, combi_1.alt)(index, from), using, ...common), (0, combi_1.per)(key, ...common), (0, combi_1.per)(...common));
15221
15223
  return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source, version_1.Version.OpenABAP)), (0, combi_1.opt)(perm));
15222
15224
  }
15223
15225
  }
@@ -16555,6 +16557,8 @@ class Submit {
16555
16557
  const exporting = (0, combi_1.str)("EXPORTING LIST TO MEMORY");
16556
16558
  const spool = (0, combi_1.seq)("SPOOL PARAMETERS", expressions_1.Source);
16557
16559
  const archive = (0, combi_1.seq)("ARCHIVE PARAMETERS", expressions_1.Source);
16560
+ const archiveMode = (0, combi_1.seq)("ARCHIVE MODE", expressions_1.Source);
16561
+ const receiver = (0, combi_1.seq)("RECEIVER", expressions_1.Source);
16558
16562
  const lineSize = (0, combi_1.seq)("LINE-SIZE", expressions_1.Source);
16559
16563
  const lineCount = (0, combi_1.seq)("LINE-COUNT", expressions_1.Source);
16560
16564
  const user = (0, combi_1.seq)("USER", expressions_1.Source);
@@ -16573,7 +16577,7 @@ class Submit {
16573
16577
  const imm = (0, combi_1.seq)("IMMEDIATELY", expressions_1.Source);
16574
16578
  const dest = (0, combi_1.seq)("DESTINATION", expressions_1.Source);
16575
16579
  const language = (0, combi_1.seq)("LANGUAGE", expressions_1.Source);
16576
- const perm = (0, combi_1.per)((0, combi_1.plus)(awith), selectionTable, (0, combi_1.plus)(awith), spool, lineSize, lineCount, archive, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
16580
+ const perm = (0, combi_1.per)((0, combi_1.plus)(awith), selectionTable, (0, combi_1.plus)(awith), (0, combi_1.plus)(awith), spool, lineSize, lineCount, archive, archiveMode, receiver, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
16577
16581
  const ret = (0, combi_1.seq)("SUBMIT", prog, (0, combi_1.opt)(perm));
16578
16582
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
16579
16583
  }
@@ -17066,7 +17070,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
17066
17070
  class TypeEnum {
17067
17071
  getMatcher() {
17068
17072
  // it is also possible to define without Value, this is covered by normal type
17069
- const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", expressions_1.NamespaceSimpleName, expressions_1.Value));
17073
+ const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", expressions_1.NamespaceSimpleName, expressions_1.Value), version_1.Version.OpenABAP);
17070
17074
  return ret;
17071
17075
  }
17072
17076
  }
@@ -17093,7 +17097,7 @@ class TypeEnumBegin {
17093
17097
  const structure = (0, combi_1.seq)("STRUCTURE", expressions_1.NamespaceSimpleName);
17094
17098
  const base = (0, combi_1.seq)("BASE TYPE", expressions_1.NamespaceSimpleName);
17095
17099
  const em = (0, combi_1.seq)("ENUM", expressions_1.NamespaceSimpleName, (0, combi_1.opt)(structure), (0, combi_1.opt)(base));
17096
- const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", "BEGIN OF", em));
17100
+ const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", "BEGIN OF", em), version_1.Version.OpenABAP);
17097
17101
  return ret;
17098
17102
  }
17099
17103
  }
@@ -17118,7 +17122,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
17118
17122
  class TypeEnumEnd {
17119
17123
  getMatcher() {
17120
17124
  const structure = (0, combi_1.seq)("STRUCTURE", expressions_1.NamespaceSimpleName);
17121
- const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", "END OF", "ENUM", expressions_1.NamespaceSimpleName, (0, combi_1.opt)(structure)));
17125
+ const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", "END OF", "ENUM", expressions_1.NamespaceSimpleName, (0, combi_1.opt)(structure)), version_1.Version.OpenABAP);
17122
17126
  return ret;
17123
17127
  }
17124
17128
  }
@@ -20543,7 +20547,7 @@ BuiltIn.methods = {
20543
20547
  "CONCAT_LINES_OF": {
20544
20548
  counter: BuiltIn.counter++,
20545
20549
  mandatory: {
20546
- "table": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
20550
+ "table": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.user }),
20547
20551
  },
20548
20552
  optional: {
20549
20553
  "sep": basic_1.CLikeType.get(),
@@ -20841,7 +20845,7 @@ BuiltIn.methods = {
20841
20845
  "LINES": {
20842
20846
  counter: BuiltIn.counter++,
20843
20847
  mandatory: {
20844
- "val": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
20848
+ "val": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.user }),
20845
20849
  },
20846
20850
  return: basic_1.IntegerType.get(),
20847
20851
  },
@@ -21286,6 +21290,7 @@ class CurrentScope {
21286
21290
  }
21287
21291
  }
21288
21292
  constructor(reg, obj) {
21293
+ this.localFriends = new Map();
21289
21294
  this.current = undefined;
21290
21295
  this.parentObj = obj;
21291
21296
  this.reg = reg;
@@ -21709,6 +21714,27 @@ class CurrentScope {
21709
21714
  }
21710
21715
  return false;
21711
21716
  }
21717
+ addLocalFriend(className, friendName) {
21718
+ var _a;
21719
+ const key = className.toUpperCase();
21720
+ const list = (_a = this.localFriends.get(key)) !== null && _a !== void 0 ? _a : [];
21721
+ list.push(friendName.toUpperCase());
21722
+ this.localFriends.set(key, list);
21723
+ }
21724
+ isLocalFriend(className, friendName) {
21725
+ var _a;
21726
+ return ((_a = this.localFriends.get(className.toUpperCase())) === null || _a === void 0 ? void 0 : _a.includes(friendName.toUpperCase())) === true;
21727
+ }
21728
+ getEnclosingClassName() {
21729
+ let curr = this.current;
21730
+ while (curr !== undefined) {
21731
+ if (curr.getIdentifier().stype === _scope_type_1.ScopeType.ClassImplementation) {
21732
+ return curr.getIdentifier().sname;
21733
+ }
21734
+ curr = curr.getParent();
21735
+ }
21736
+ return undefined;
21737
+ }
21712
21738
  isGlobalOO() {
21713
21739
  return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
21714
21740
  }
@@ -22462,6 +22488,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
22462
22488
  exports.TypeUtils = void 0;
22463
22489
  const types_1 = __webpack_require__(/*! ../types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
22464
22490
  const basic_1 = __webpack_require__(/*! ../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
22491
+ const table_type_1 = __webpack_require__(/*! ../types/basic/table_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/table_type.js");
22492
+ const enum_type_1 = __webpack_require__(/*! ../types/basic/enum_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/enum_type.js");
22465
22493
  const cgeneric_type_1 = __webpack_require__(/*! ../types/basic/cgeneric_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/cgeneric_type.js");
22466
22494
  const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
22467
22495
  // todo: refactor to static? for performance
@@ -22538,7 +22566,8 @@ class TypeUtils {
22538
22566
  || type instanceof basic_1.DataType
22539
22567
  || type instanceof basic_1.CLikeType
22540
22568
  || type instanceof basic_1.PackedType
22541
- || type instanceof basic_1.TimeType) {
22569
+ || type instanceof basic_1.TimeType
22570
+ || type instanceof enum_type_1.EnumType) {
22542
22571
  return true;
22543
22572
  }
22544
22573
  return false;
@@ -22888,6 +22917,17 @@ class TypeUtils {
22888
22917
  }
22889
22918
  else if (source instanceof basic_1.TableType) {
22890
22919
  if (target instanceof basic_1.TableType) {
22920
+ const sourceKeyType = source.getOptions().keyType;
22921
+ const targetKeyType = target.getOptions().keyType;
22922
+ if (sourceKeyType !== targetKeyType
22923
+ && sourceKeyType !== table_type_1.TableKeyType.user
22924
+ && targetKeyType !== table_type_1.TableKeyType.user) {
22925
+ return false;
22926
+ }
22927
+ if (sourceKeyType === table_type_1.TableKeyType.empty && targetKeyType !== table_type_1.TableKeyType.empty
22928
+ && !(target.getRowType() instanceof basic_1.AnyType)) {
22929
+ return false;
22930
+ }
22891
22931
  return this.isAssignableStrict(source.getRowType(), target.getRowType());
22892
22932
  }
22893
22933
  else if (target instanceof basic_1.UnknownType
@@ -23616,7 +23656,7 @@ class BasicTypes {
23616
23656
  || text === "TYPE HASHED TABLE"
23617
23657
  || text === "TYPE INDEX TABLE"
23618
23658
  || text === "TYPE ANY TABLE") {
23619
- return new Types.TableType(Types.AnyType.get(), { withHeader: node.concatTokens().toUpperCase().includes("WITH HEADER LINE"), keyType: Types.TableKeyType.default });
23659
+ return new Types.TableType(Types.AnyType.get(), { withHeader: node.concatTokens().toUpperCase().includes("WITH HEADER LINE"), keyType: Types.TableKeyType.user });
23620
23660
  }
23621
23661
  else if (text.startsWith("LIKE ")) {
23622
23662
  let sub = node.findFirstExpression(Expressions.Type);
@@ -26462,7 +26502,7 @@ class MethodParameters {
26462
26502
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26463
26503
  return;
26464
26504
  }
26465
- else if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(parameterType, item.targetType) === false) {
26505
+ else if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(parameterType, item.targetType) === false) {
26466
26506
  const message = "Method parameter type not compatible, " + item.name;
26467
26507
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26468
26508
  return;
@@ -26490,7 +26530,7 @@ class MethodParameters {
26490
26530
  }
26491
26531
  parameterType = parameter.getType();
26492
26532
  }
26493
- if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(parameterType, item.targetType) === false) {
26533
+ if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(parameterType, item.targetType) === false) {
26494
26534
  const message = "Method parameter type not compatible, " + item.name;
26495
26535
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26496
26536
  return;
@@ -26805,6 +26845,7 @@ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/
26805
26845
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
26806
26846
  const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
26807
26847
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
26848
+ const create_object_1 = __webpack_require__(/*! ../statements/create_object */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/create_object.js");
26808
26849
  class NewObject {
26809
26850
  static runSyntax(node, input, targetType) {
26810
26851
  let ret = undefined;
@@ -26838,6 +26879,13 @@ class NewObject {
26838
26879
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26839
26880
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
26840
26881
  }
26882
+ if (clas) {
26883
+ const err = create_object_1.CreateObject.checkInstantiationAllowed(clas, input);
26884
+ if (err) {
26885
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), err));
26886
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
26887
+ }
26888
+ }
26841
26889
  }
26842
26890
  else if (typeName === "#" && targetType) {
26843
26891
  ret = targetType;
@@ -26859,6 +26907,13 @@ class NewObject {
26859
26907
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
26860
26908
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
26861
26909
  }
26910
+ if (clas) {
26911
+ const err = create_object_1.CreateObject.checkInstantiationAllowed(clas, input);
26912
+ if (err) {
26913
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), err));
26914
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
26915
+ }
26916
+ }
26862
26917
  ret = objref;
26863
26918
  }
26864
26919
  }
@@ -27415,16 +27470,17 @@ class Select {
27415
27470
  if (dbSources.length !== 1) {
27416
27471
  return basic_1.VoidType.get("SELECT_todo3");
27417
27472
  }
27473
+ const tableOptions = { withHeader: false, keyType: basic_1.TableKeyType.empty };
27418
27474
  if (dbSources[0] === undefined) {
27419
27475
  // then its a voided table
27420
- return basic_1.VoidType.get("SELECT_todo4");
27476
+ return new basic_1.TableType(basic_1.VoidType.get("SELECT_todo4"), tableOptions, undefined);
27421
27477
  }
27422
27478
  const dbType = dbSources[0].parseType(scope.getRegistry());
27423
27479
  if (!(dbType instanceof basic_1.StructureType)) {
27424
27480
  return basic_1.VoidType.get("SELECT_todo5");
27425
27481
  }
27426
27482
  if (fields.length === 1 && fields[0].code === "*") {
27427
- return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
27483
+ return new basic_1.TableType(dbType, tableOptions, undefined);
27428
27484
  }
27429
27485
  const allFieldsSimple = fields.every(f => isSimple.test(f.code));
27430
27486
  if (allFieldsSimple === true) {
@@ -27436,7 +27492,7 @@ class Select {
27436
27492
  }
27437
27493
  components.push({ name: field.code, type });
27438
27494
  }
27439
- return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
27495
+ return new basic_1.TableType(new basic_1.StructureType(components), tableOptions, undefined);
27440
27496
  }
27441
27497
  return basic_1.VoidType.get("SELECT_todo7");
27442
27498
  }
@@ -27624,6 +27680,11 @@ class Source {
27624
27680
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
27625
27681
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
27626
27682
  }
27683
+ else if (foundType === null || foundType === void 0 ? void 0 : foundType.isGeneric()) {
27684
+ const message = "Cannot CONV to generic type";
27685
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
27686
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
27687
+ }
27627
27688
  this.addIfInferred(node, input, foundType);
27628
27689
  return foundType;
27629
27690
  }
@@ -30058,6 +30119,7 @@ const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@a
30058
30119
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
30059
30120
  class ClassLocalFriends {
30060
30121
  runSyntax(node, input) {
30122
+ var _a;
30061
30123
  const classNames = node.findAllExpressions(Expressions.ClassName);
30062
30124
  const found = classNames[0];
30063
30125
  if (found) {
@@ -30088,6 +30150,12 @@ class ClassLocalFriends {
30088
30150
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
30089
30151
  return;
30090
30152
  }
30153
+ else {
30154
+ const befriendedName = (_a = classNames[0]) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();
30155
+ if (befriendedName) {
30156
+ input.scope.addLocalFriend(befriendedName, className);
30157
+ }
30158
+ }
30091
30159
  }
30092
30160
  }
30093
30161
  }
@@ -30569,6 +30637,7 @@ const types_1 = __webpack_require__(/*! ../../types */ "./node_modules/@abaplint
30569
30637
  const _object_oriented_1 = __webpack_require__(/*! ../_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
30570
30638
  const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
30571
30639
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
30640
+ const visibility_1 = __webpack_require__(/*! ../../4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
30572
30641
  class CreateObject {
30573
30642
  runSyntax(node, input) {
30574
30643
  var _a;
@@ -30665,8 +30734,46 @@ class CreateObject {
30665
30734
  ooName = found.getVoided();
30666
30735
  }
30667
30736
  input.scope.addReference(t === null || t === void 0 ? void 0 : t.getFirstToken(), cdef, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: ooName });
30737
+ if (cdef !== undefined) {
30738
+ const err = CreateObject.checkInstantiationAllowed(cdef, input);
30739
+ if (err) {
30740
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), err));
30741
+ return;
30742
+ }
30743
+ }
30668
30744
  this.validateParameters(cdef, node, input);
30669
30745
  }
30746
+ static checkInstantiationAllowed(cdef, input) {
30747
+ var _a, _b;
30748
+ const createVis = cdef.getCreateVisibility();
30749
+ if (createVis === visibility_1.Visibility.Public) {
30750
+ return undefined;
30751
+ }
30752
+ const enclosingClass = input.scope.getEnclosingClassName();
30753
+ if (enclosingClass === undefined) {
30754
+ return cdef.getName() + " cannot be instantiated, class is defined as " +
30755
+ (createVis === visibility_1.Visibility.Private ? "private" : "protected");
30756
+ }
30757
+ if (enclosingClass.toUpperCase() === cdef.getName().toUpperCase()) {
30758
+ return undefined;
30759
+ }
30760
+ if (cdef.getFriends().some(f => f.toUpperCase() === enclosingClass.toUpperCase()) ||
30761
+ input.scope.isLocalFriend(cdef.getName(), enclosingClass)) {
30762
+ return undefined;
30763
+ }
30764
+ if (createVis === visibility_1.Visibility.Protected) {
30765
+ // subclasses are also allowed
30766
+ let sup = (_a = input.scope.findClassDefinition(enclosingClass)) === null || _a === void 0 ? void 0 : _a.getSuperClass();
30767
+ while (sup !== undefined) {
30768
+ if (sup.toUpperCase() === cdef.getName().toUpperCase()) {
30769
+ return undefined;
30770
+ }
30771
+ sup = (_b = input.scope.findClassDefinition(sup)) === null || _b === void 0 ? void 0 : _b.getSuperClass();
30772
+ }
30773
+ }
30774
+ return cdef.getName() + " cannot be instantiated, class is defined as " +
30775
+ (createVis === visibility_1.Visibility.Private ? "private" : "protected");
30776
+ }
30670
30777
  validateParameters(cdef, node, input) {
30671
30778
  var _a, _b, _c, _d;
30672
30779
  if (cdef === undefined) {
@@ -37817,6 +37924,7 @@ __exportStar(__webpack_require__(/*! ./date_type */ "./node_modules/@abaplint/co
37817
37924
  __exportStar(__webpack_require__(/*! ./decfloat_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat_type.js"), exports);
37818
37925
  __exportStar(__webpack_require__(/*! ./decfloat16_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat16_type.js"), exports);
37819
37926
  __exportStar(__webpack_require__(/*! ./decfloat34_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/decfloat34_type.js"), exports);
37927
+ __exportStar(__webpack_require__(/*! ./enum_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/enum_type.js"), exports);
37820
37928
  __exportStar(__webpack_require__(/*! ./float_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/float_type.js"), exports);
37821
37929
  __exportStar(__webpack_require__(/*! ./floating_point_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/floating_point_type.js"), exports);
37822
37930
  __exportStar(__webpack_require__(/*! ./generic_object_reference_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/generic_object_reference_type.js"), exports);
@@ -38675,6 +38783,7 @@ class Attributes {
38675
38783
  this.instance = [];
38676
38784
  this.constants = [];
38677
38785
  this.aliases = [];
38786
+ this.declaredInterfaces = [];
38678
38787
  this.tlist = [];
38679
38788
  this.filename = input.filename;
38680
38789
  this.parse(node, input);
@@ -38750,8 +38859,15 @@ class Attributes {
38750
38859
  }
38751
38860
  /////////////////////////////
38752
38861
  parse(node, input) {
38862
+ var _a, _b;
38753
38863
  const cdef = node.findDirectStructure(Structures.ClassDefinition);
38754
38864
  if (cdef) {
38865
+ for (const i of cdef.findAllStatements(Statements.InterfaceDef)) {
38866
+ const name = (_a = i.findFirstExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();
38867
+ if (name) {
38868
+ this.declaredInterfaces.push(name.toUpperCase());
38869
+ }
38870
+ }
38755
38871
  this.parseSection(cdef.findDirectStructure(Structures.PublicSection), visibility_1.Visibility.Public, input);
38756
38872
  this.parseSection(cdef.findDirectStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected, input);
38757
38873
  this.parseSection(cdef.findDirectStructure(Structures.PrivateSection), visibility_1.Visibility.Private, input);
@@ -38759,6 +38875,12 @@ class Attributes {
38759
38875
  }
38760
38876
  const idef = node.findDirectStructure(Structures.Interface);
38761
38877
  if (idef) {
38878
+ for (const i of idef.findAllStatements(Statements.InterfaceDef)) {
38879
+ const name = (_b = i.findFirstExpression(Expressions.InterfaceName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
38880
+ if (name) {
38881
+ this.declaredInterfaces.push(name.toUpperCase());
38882
+ }
38883
+ }
38762
38884
  this.parseSection(idef.findDirectStructure(Structures.SectionContents), visibility_1.Visibility.Public, input);
38763
38885
  return;
38764
38886
  }
@@ -38867,6 +38989,12 @@ class Attributes {
38867
38989
  input.scope.addNamedIdentifier(aliasName.getStr(), foundAttribute);
38868
38990
  }
38869
38991
  }
38992
+ else if (this.declaredInterfaces.includes(name.toUpperCase()) || input.scope.getDDIC().inErrorNamespace(name) === false) {
38993
+ input.scope.addReference(compToken, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, input.filename);
38994
+ }
38995
+ else {
38996
+ throw new Error("Interface " + name + " not found");
38997
+ }
38870
38998
  }
38871
38999
  }
38872
39000
  parseAttribute(node, visibility, input) {
@@ -38940,6 +39068,7 @@ const event_definition_1 = __webpack_require__(/*! ./event_definition */ "./node
38940
39068
  const visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
38941
39069
  const _object_oriented_1 = __webpack_require__(/*! ../5_syntax/_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
38942
39070
  const _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
39071
+ const _syntax_input_1 = __webpack_require__(/*! ../5_syntax/_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
38943
39072
  class ClassDefinition extends _identifier_1.Identifier {
38944
39073
  constructor(node, input) {
38945
39074
  var _a;
@@ -38977,6 +39106,15 @@ class ClassDefinition extends _identifier_1.Identifier {
38977
39106
  this.testing = concat.includes(" FOR TESTING");
38978
39107
  this.sharedMemory = concat.includes(" SHARED MEMORY ENABLED");
38979
39108
  this.abstract = (def === null || def === void 0 ? void 0 : def.findDirectTokenByText("ABSTRACT")) !== undefined;
39109
+ if (concat.includes(" CREATE PRIVATE")) {
39110
+ this.createVisibilityValue = visibility_1.Visibility.Private;
39111
+ }
39112
+ else if (concat.includes(" CREATE PROTECTED")) {
39113
+ this.createVisibilityValue = visibility_1.Visibility.Protected;
39114
+ }
39115
+ else {
39116
+ this.createVisibilityValue = visibility_1.Visibility.Public;
39117
+ }
38980
39118
  // perform checks after everything has been initialized
38981
39119
  this.checkMethodsFromSuperClasses(input.scope);
38982
39120
  this.checkMethodNameLength();
@@ -39020,6 +39158,9 @@ class ClassDefinition extends _identifier_1.Identifier {
39020
39158
  isSharedMemory() {
39021
39159
  return this.sharedMemory;
39022
39160
  }
39161
+ getCreateVisibility() {
39162
+ return this.createVisibilityValue;
39163
+ }
39023
39164
  /*
39024
39165
  public getEvents() {
39025
39166
  }
@@ -39075,8 +39216,20 @@ class ClassDefinition extends _identifier_1.Identifier {
39075
39216
  const result = [];
39076
39217
  for (const n of ((_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(Expressions.ClassFriends)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.ClassName)) || []) {
39077
39218
  const token = n.getFirstToken();
39078
- this.addReference(token, input);
39079
39219
  const name = token.getStr();
39220
+ const s = input.scope.findClassDefinition(name);
39221
+ if (s) {
39222
+ input.scope.addReference(token, s, _reference_1.ReferenceType.ObjectOrientedReference, input.filename, { ooName: name.toUpperCase(), ooType: "CLAS" });
39223
+ }
39224
+ else if (input.scope.existsObject(name) !== undefined) {
39225
+ // DEFINITION DEFERRED friend
39226
+ }
39227
+ else if (input.scope.getDDIC().inErrorNamespace(name) === false) {
39228
+ input.scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, input.filename);
39229
+ }
39230
+ else {
39231
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, token, name.toUpperCase() + " does not exist"));
39232
+ }
39080
39233
  result.push(name);
39081
39234
  }
39082
39235
  return result;
@@ -54796,7 +54949,7 @@ class Registry {
54796
54949
  }
54797
54950
  static abaplintVersion() {
54798
54951
  // magic, see build script "version.sh"
54799
- return "2.118.2";
54952
+ return "2.118.7";
54800
54953
  }
54801
54954
  getDDICReferences() {
54802
54955
  return this.ddicReferences;
@@ -56481,11 +56634,17 @@ MODIFY TABLE foo FROM bar.`,
56481
56634
  match = this.tryMatch(statement, this.reg, Statements.DeleteDatabase);
56482
56635
  }
56483
56636
  else if (statement.get() instanceof Statements.ModifyInternal) {
56484
- match = this.tryMatch(statement, this.reg, Statements.ModifyDatabase);
56637
+ match = this.tryMatch(statement, this.reg, Statements.ModifyDatabase) || this.isBareStatement(statement);
56485
56638
  }
56486
56639
  else if (statement.get() instanceof Statements.ModifyDatabase) {
56487
56640
  match = this.tryMatch(statement, this.reg, Statements.ModifyInternal);
56488
56641
  }
56642
+ else if (statement.get() instanceof Statements.InsertDatabase) {
56643
+ match = this.isBareStatement(statement);
56644
+ }
56645
+ else if (statement.get() instanceof Statements.UpdateDatabase) {
56646
+ match = this.isBareStatement(statement);
56647
+ }
56489
56648
  if (match) {
56490
56649
  const issue = issue_1.Issue.atStatement(file, statement, this.getMessage(), this.getMetadata().key, this.conf.severity);
56491
56650
  issues.push(issue);
@@ -56493,6 +56652,11 @@ MODIFY TABLE foo FROM bar.`,
56493
56652
  }
56494
56653
  return issues;
56495
56654
  }
56655
+ isBareStatement(st) {
56656
+ const tokens = st.getTokens().slice(0);
56657
+ tokens.pop();
56658
+ return tokens.length === 2;
56659
+ }
56496
56660
  tryMatch(st, reg, type1) {
56497
56661
  const ver = reg.getConfig().getVersion();
56498
56662
  const tokens = st.getTokens().slice(0);
@@ -56947,6 +57111,98 @@ exports.CallTransactionAuthorityCheck = CallTransactionAuthorityCheck;
56947
57111
 
56948
57112
  /***/ },
56949
57113
 
57114
+ /***/ "./node_modules/@abaplint/core/build/src/rules/catch_and_raise.js"
57115
+ /*!************************************************************************!*\
57116
+ !*** ./node_modules/@abaplint/core/build/src/rules/catch_and_raise.js ***!
57117
+ \************************************************************************/
57118
+ (__unused_webpack_module, exports, __webpack_require__) {
57119
+
57120
+ "use strict";
57121
+
57122
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57123
+ exports.CatchAndRaise = exports.CatchAndRaiseConf = void 0;
57124
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
57125
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
57126
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
57127
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
57128
+ const Structures = __webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
57129
+ const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
57130
+ const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
57131
+ class CatchAndRaiseConf extends _basic_rule_config_1.BasicRuleConfig {
57132
+ }
57133
+ exports.CatchAndRaiseConf = CatchAndRaiseConf;
57134
+ class CatchAndRaise extends _abap_rule_1.ABAPRule {
57135
+ constructor() {
57136
+ super(...arguments);
57137
+ this.conf = new CatchAndRaiseConf();
57138
+ }
57139
+ getMetadata() {
57140
+ return {
57141
+ key: "catch_and_raise",
57142
+ title: "Catch and re-raise same exception",
57143
+ shortDescription: `Reports CATCH blocks that only re-raise the caught exception without any handling`,
57144
+ badExample: `TRY.\n something( ).\nCATCH zcx_something INTO DATA(lv_exc).\n RAISE EXCEPTION lv_exc.\nENDTRY.`,
57145
+ goodExample: `TRY.\n something( ).\nCATCH zcx_something.\n " handle exception\nENDTRY.`,
57146
+ tags: [_irule_1.RuleTag.SingleFile],
57147
+ };
57148
+ }
57149
+ getConfig() {
57150
+ return this.conf;
57151
+ }
57152
+ setConfig(conf) {
57153
+ this.conf = conf;
57154
+ }
57155
+ runParsed(file) {
57156
+ const issues = [];
57157
+ const stru = file.getStructure();
57158
+ if (stru === undefined) {
57159
+ return [];
57160
+ }
57161
+ for (const catchStruct of stru.findAllStructures(Structures.Catch)) {
57162
+ const catchStatement = catchStruct.findDirectStatement(Statements.Catch);
57163
+ if (catchStatement === undefined) {
57164
+ continue;
57165
+ }
57166
+ const target = catchStatement.findFirstExpression(Expressions.Target);
57167
+ if (target === undefined) {
57168
+ continue;
57169
+ }
57170
+ const targetField = target.findFirstExpression(Expressions.TargetField);
57171
+ if (targetField === undefined) {
57172
+ continue;
57173
+ }
57174
+ const caughtVar = targetField.getFirstToken().getStr().toUpperCase();
57175
+ const allStatements = catchStruct.findAllStatementNodes();
57176
+ if (allStatements.length !== 2) {
57177
+ continue;
57178
+ }
57179
+ if (!(allStatements[1].get() instanceof Statements.Raise)) {
57180
+ continue;
57181
+ }
57182
+ const raiseStatement = allStatements[1];
57183
+ const raiseConcat = raiseStatement.concatTokens().toUpperCase().replace(/\.$/, "").trim();
57184
+ if (!raiseConcat.startsWith("RAISE EXCEPTION ")) {
57185
+ continue;
57186
+ }
57187
+ const parts = raiseConcat.split(/\s+/);
57188
+ if (parts.length !== 3) {
57189
+ continue;
57190
+ }
57191
+ if (parts[2] === caughtVar) {
57192
+ issues.push(issue_1.Issue.atStatement(file, catchStatement, this.getMessage(), this.getMetadata().key, this.conf.severity));
57193
+ }
57194
+ }
57195
+ return issues;
57196
+ }
57197
+ getMessage() {
57198
+ return "Caught exception is immediately re-raised, CATCH block has no effect";
57199
+ }
57200
+ }
57201
+ exports.CatchAndRaise = CatchAndRaise;
57202
+ //# sourceMappingURL=catch_and_raise.js.map
57203
+
57204
+ /***/ },
57205
+
56950
57206
  /***/ "./node_modules/@abaplint/core/build/src/rules/cds_association_name.js"
56951
57207
  /*!*****************************************************************************!*\
56952
57208
  !*** ./node_modules/@abaplint/core/build/src/rules/cds_association_name.js ***!
@@ -66715,6 +66971,7 @@ __exportStar(__webpack_require__(/*! ./avoid_use */ "./node_modules/@abaplint/co
66715
66971
  __exportStar(__webpack_require__(/*! ./begin_end_names */ "./node_modules/@abaplint/core/build/src/rules/begin_end_names.js"), exports);
66716
66972
  __exportStar(__webpack_require__(/*! ./begin_single_include */ "./node_modules/@abaplint/core/build/src/rules/begin_single_include.js"), exports);
66717
66973
  __exportStar(__webpack_require__(/*! ./call_transaction_authority_check */ "./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js"), exports);
66974
+ __exportStar(__webpack_require__(/*! ./catch_and_raise */ "./node_modules/@abaplint/core/build/src/rules/catch_and_raise.js"), exports);
66718
66975
  __exportStar(__webpack_require__(/*! ./cds_association_name */ "./node_modules/@abaplint/core/build/src/rules/cds_association_name.js"), exports);
66719
66976
  __exportStar(__webpack_require__(/*! ./cds_comment_style */ "./node_modules/@abaplint/core/build/src/rules/cds_comment_style.js"), exports);
66720
66977
  __exportStar(__webpack_require__(/*! ./cds_field_order */ "./node_modules/@abaplint/core/build/src/rules/cds_field_order.js"), exports);
@@ -87715,6 +87972,13 @@ class DataTranspiler {
87715
87972
  else {
87716
87973
  value = DataTranspiler.buildValue(node, traversal_1.Traversal.prefixVariable(found.getName().toLowerCase()), traversal);
87717
87974
  }
87975
+ // for enum types, initialize with the first enum value
87976
+ if (found.getType() instanceof abaplint.BasicTypes.EnumType && value === "") {
87977
+ const enumDefault = DataTranspiler.findEnumDefault(scope, found.getType());
87978
+ if (enumDefault) {
87979
+ value = "\n" + traversal_1.Traversal.prefixVariable(found.getName().toLowerCase()) + ".set(\"" + enumDefault + "\");";
87980
+ }
87981
+ }
87718
87982
  const ret = new chunk_1.Chunk()
87719
87983
  .appendString("let ")
87720
87984
  .appendString(traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(found.getName().toLowerCase())))
@@ -87723,6 +87987,26 @@ class DataTranspiler {
87723
87987
  .appendString(value);
87724
87988
  return ret;
87725
87989
  }
87990
+ static findEnumDefault(scope, _enumType) {
87991
+ let current = scope;
87992
+ while (current) {
87993
+ const vars = current.getData().vars;
87994
+ for (const key of Object.keys(vars)) {
87995
+ const v = vars[key];
87996
+ if (v.getMeta().includes("enum" /* abaplint.IdentifierMeta.Enum */)) {
87997
+ const structType = v.getType();
87998
+ if (structType instanceof abaplint.BasicTypes.StructureType) {
87999
+ const components = structType.getComponents();
88000
+ if (components.length > 0) {
88001
+ return components[0].name.toUpperCase();
88002
+ }
88003
+ }
88004
+ }
88005
+ }
88006
+ current = current.getParent();
88007
+ }
88008
+ return undefined;
88009
+ }
87726
88010
  static buildValue(node, name, traversal) {
87727
88011
  let value = "";
87728
88012
  const val = node.findFirstExpression(abaplint.Expressions.Value);
@@ -93293,6 +93577,7 @@ __exportStar(__webpack_require__(/*! ./module */ "./node_modules/@abaplint/trans
93293
93577
  __exportStar(__webpack_require__(/*! ./select */ "./node_modules/@abaplint/transpiler/build/src/structures/select.js"), exports);
93294
93578
  __exportStar(__webpack_require__(/*! ./method */ "./node_modules/@abaplint/transpiler/build/src/structures/method.js"), exports);
93295
93579
  __exportStar(__webpack_require__(/*! ./try */ "./node_modules/@abaplint/transpiler/build/src/structures/try.js"), exports);
93580
+ __exportStar(__webpack_require__(/*! ./type_enum */ "./node_modules/@abaplint/transpiler/build/src/structures/type_enum.js"), exports);
93296
93581
  __exportStar(__webpack_require__(/*! ./types */ "./node_modules/@abaplint/transpiler/build/src/structures/types.js"), exports);
93297
93582
  __exportStar(__webpack_require__(/*! ./when */ "./node_modules/@abaplint/transpiler/build/src/structures/when.js"), exports);
93298
93583
  __exportStar(__webpack_require__(/*! ./while */ "./node_modules/@abaplint/transpiler/build/src/structures/while.js"), exports);
@@ -93706,6 +93991,51 @@ exports.TryTranspiler = TryTranspiler;
93706
93991
 
93707
93992
  /***/ },
93708
93993
 
93994
+ /***/ "./node_modules/@abaplint/transpiler/build/src/structures/type_enum.js"
93995
+ /*!*****************************************************************************!*\
93996
+ !*** ./node_modules/@abaplint/transpiler/build/src/structures/type_enum.js ***!
93997
+ \*****************************************************************************/
93998
+ (__unused_webpack_module, exports, __webpack_require__) {
93999
+
94000
+ "use strict";
94001
+
94002
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
94003
+ exports.TypeEnumTranspiler = void 0;
94004
+ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
94005
+ const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
94006
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
94007
+ class TypeEnumTranspiler {
94008
+ transpile(node, _traversal) {
94009
+ const begin = node.findDirectStatement(abaplint.Statements.TypeEnumBegin);
94010
+ if (begin === undefined) {
94011
+ return new chunk_1.Chunk("");
94012
+ }
94013
+ const nsNames = begin.findAllExpressions(abaplint.Expressions.NamespaceSimpleName);
94014
+ if (nsNames.length < 2) {
94015
+ return new chunk_1.Chunk("");
94016
+ }
94017
+ const structureName = nsNames[1].concatTokens().toLowerCase();
94018
+ const values = [];
94019
+ for (const t of node.findDirectStatements(abaplint.Statements.Type)) {
94020
+ const name = t.findFirstExpression(abaplint.Expressions.NamespaceSimpleName);
94021
+ if (name) {
94022
+ values.push(name.concatTokens().toLowerCase());
94023
+ }
94024
+ }
94025
+ const fields = values.map(v => `"${v}": new abap.types.String()`).join(",\n");
94026
+ let ret = `let ${traversal_1.Traversal.prefixVariable(structureName)} = new abap.types.Structure({
94027
+ ${fields}});\n`;
94028
+ for (const v of values) {
94029
+ ret += `${traversal_1.Traversal.prefixVariable(structureName)}.get().${v}.set("${v.toUpperCase()}");\n`;
94030
+ }
94031
+ return new chunk_1.Chunk(ret);
94032
+ }
94033
+ }
94034
+ exports.TypeEnumTranspiler = TypeEnumTranspiler;
94035
+ //# sourceMappingURL=type_enum.js.map
94036
+
94037
+ /***/ },
94038
+
93709
94039
  /***/ "./node_modules/@abaplint/transpiler/build/src/structures/types.js"
93710
94040
  /*!*************************************************************************!*\
93711
94041
  !*** ./node_modules/@abaplint/transpiler/build/src/structures/types.js ***!
@@ -93995,6 +94325,12 @@ class TranspileTypes {
93995
94325
  else if (type instanceof abaplint.BasicTypes.DecFloat34Type) {
93996
94326
  resolved = "DecFloat34";
93997
94327
  }
94328
+ else if (type instanceof abaplint.BasicTypes.EnumType) {
94329
+ resolved = "String";
94330
+ if (type.getQualifiedName() !== undefined) {
94331
+ extra = "{qualifiedName: \"" + type.getQualifiedName()?.toUpperCase() + "\"}";
94332
+ }
94333
+ }
93998
94334
  else if (type instanceof abaplint.BasicTypes.UnknownType) {
93999
94335
  return `(() => { throw new Error("Unknown type: ${type.getError()}") })()`;
94000
94336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.13.1",
3
+ "version": "2.13.2",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.118.2",
31
- "@abaplint/transpiler": "^2.13.1",
30
+ "@abaplint/core": "^2.118.7",
31
+ "@abaplint/transpiler": "^2.13.2",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.12.0",
34
34
  "@types/progress": "^2.0.7",