@abaplint/transpiler-cli 2.13.95 → 2.13.97

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 +1692 -988
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -13866,7 +13866,7 @@ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@a
13866
13866
  class CreateData {
13867
13867
  getMatcher() {
13868
13868
  const areaHandle = (0, combi_1.seq)("AREA HANDLE", expressions_1.Source);
13869
- const typeHandle = (0, combi_1.seq)("TYPE HANDLE", expressions_1.Source);
13869
+ const typeHandle = (0, combi_1.seq)("TYPE HANDLE", expressions_1.SimpleSource3);
13870
13870
  const type = (0, combi_1.seq)((0, combi_1.alt)("TYPE", "TYPE REF TO", "TYPE TABLE OF", "TYPE TABLE OF REF TO", "TYPE SORTED TABLE OF", "TYPE HASHED TABLE OF", "TYPE STANDARD TABLE OF", "TYPE LINE OF"), (0, combi_1.alt)(expressions_1.TypeName, expressions_1.Dynamic));
13871
13871
  const like = (0, combi_1.seq)((0, combi_1.alt)("LIKE", "LIKE HASHED TABLE OF", "LIKE LINE OF", "LIKE STANDARD TABLE OF", "LIKE SORTED TABLE OF", "LIKE TABLE OF"), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic));
13872
13872
  const length = (0, combi_1.seq)("LENGTH", expressions_1.Source);
@@ -17108,7 +17108,7 @@ class Loop {
17108
17108
  getMatcher() {
17109
17109
  const where = (0, combi_1.seq)("WHERE", (0, combi_1.alt)(expressions_1.ComponentCond, (0, combi_1.verNotLang)(version_1.LanguageVersion.KeyUser, expressions_1.Dynamic)));
17110
17110
  const group = (0, combi_1.ver)(version_1.Release.v740sp08, (0, combi_1.seq)("GROUP BY", loop_group_by_1.LoopGroupBy), { also: combi_1.AlsoIn.OpenABAP });
17111
- const step = (0, combi_1.ver)(version_1.Release.v757, (0, combi_1.seq)("STEP", expressions_1.Source));
17111
+ const step = (0, combi_1.ver)(version_1.Release.v757, (0, combi_1.seq)("STEP", expressions_1.Source), { also: combi_1.AlsoIn.OpenABAP });
17112
17112
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
17113
17113
  const to = (0, combi_1.seq)("TO", expressions_1.Source);
17114
17114
  const usingKey = (0, combi_1.seq)("USING KEY", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));
@@ -28100,6 +28100,7 @@ class TypeUtils {
28100
28100
  || type instanceof basic_1.StringType
28101
28101
  || type instanceof basic_1.CLikeType
28102
28102
  || type instanceof basic_1.CSequenceType
28103
+ || type instanceof basic_1.DataType
28103
28104
  || this.isCharLikeField(type);
28104
28105
  }
28105
28106
  isCharLike(type) {
@@ -29350,6 +29351,7 @@ class BasicTypes {
29350
29351
  }
29351
29352
  parseType(node, qualifiedName) {
29352
29353
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
29354
+ var _l;
29353
29355
  const typeName = node.findFirstExpression(Expressions.TypeName);
29354
29356
  let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
29355
29357
  if (text === undefined) {
@@ -29500,6 +29502,9 @@ class BasicTypes {
29500
29502
  length = parseInt(int.concatTokens(), 10);
29501
29503
  }
29502
29504
  }
29505
+ else if (node.get() instanceof Statements.Parameter) {
29506
+ length = (_l = this.findParameterLength(node)) !== null && _l !== void 0 ? _l : length;
29507
+ }
29503
29508
  found = new Types.CharacterType(length, { qualifiedName: qualifiedName }); // fallback
29504
29509
  if (this.isOccurs(node)) {
29505
29510
  found = new Types.TableType(found, { withHeader: concat.includes(" WITH HEADER LINE"), keyType: Types.TableKeyType.default }, qualifiedName);
@@ -29869,11 +29874,43 @@ class BasicTypes {
29869
29874
  throw new Error("findValue, unexpected");
29870
29875
  }
29871
29876
  findDecimals(node) {
29872
- var _a, _b;
29877
+ var _a, _b, _c;
29873
29878
  const dec = (_b = (_a = node.findDirectExpression(Expressions.Decimals)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Integer)) === null || _b === void 0 ? void 0 : _b.concatTokens();
29874
29879
  if (dec) {
29875
29880
  return parseInt(dec, 10);
29876
29881
  }
29882
+ if (node.get() instanceof Statements.Parameter) {
29883
+ // PARAMETERS spells it seq("DECIMALS", Source) instead of the Decimals expression
29884
+ const source = (_c = this.findParameterAddition(node, "DECIMALS")) === null || _c === void 0 ? void 0 : _c.concatTokens();
29885
+ if (source && /^\d+$/.test(source)) {
29886
+ return parseInt(source, 10);
29887
+ }
29888
+ }
29889
+ return undefined;
29890
+ }
29891
+ // PARAMETERS spells it seq("LENGTH", Constant) instead of the Length expression
29892
+ findParameterLength(node) {
29893
+ const constant = this.findParameterAddition(node, "LENGTH");
29894
+ if (constant === undefined) {
29895
+ return undefined;
29896
+ }
29897
+ const length = this.parseInt(constant.concatTokens());
29898
+ return length === undefined || isNaN(length) ? undefined : length;
29899
+ }
29900
+ // finds the expression following a direct keyword token, "VISIBLE LENGTH" is not "LENGTH"
29901
+ findParameterAddition(node, keyword) {
29902
+ var _a;
29903
+ const children = node.getChildren();
29904
+ for (let i = 0; i < children.length - 1; i++) {
29905
+ const child = children[i];
29906
+ const next = children[i + 1];
29907
+ if (child instanceof nodes_1.ExpressionNode
29908
+ || child.getFirstToken().getStr().toUpperCase() !== keyword
29909
+ || ((_a = children[i - 1]) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr().toUpperCase()) === "VISIBLE") {
29910
+ continue;
29911
+ }
29912
+ return next instanceof nodes_1.ExpressionNode ? next : undefined;
29913
+ }
29877
29914
  return undefined;
29878
29915
  }
29879
29916
  findLength(node) {
@@ -29894,6 +29931,9 @@ class BasicTypes {
29894
29931
  }
29895
29932
  }
29896
29933
  if (val === undefined) {
29934
+ if (node.get() instanceof Statements.Parameter) {
29935
+ return this.findParameterLength(node);
29936
+ }
29897
29937
  return undefined;
29898
29938
  }
29899
29939
  const intExpr = val.findFirstExpression(Expressions.Integer);
@@ -30043,6 +30083,72 @@ function checkOffsetLength(source, sourceType, method, input) {
30043
30083
 
30044
30084
  /***/ },
30045
30085
 
30086
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/_check_text_symbol.js"
30087
+ /*!***********************************************************************************************!*\
30088
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/_check_text_symbol.js ***!
30089
+ \***********************************************************************************************/
30090
+ (__unused_webpack_module, exports, __webpack_require__) {
30091
+
30092
+ "use strict";
30093
+
30094
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
30095
+ if (k2 === undefined) k2 = k;
30096
+ var desc = Object.getOwnPropertyDescriptor(m, k);
30097
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
30098
+ desc = { enumerable: true, get: function() { return m[k]; } };
30099
+ }
30100
+ Object.defineProperty(o, k2, desc);
30101
+ }) : (function(o, m, k, k2) {
30102
+ if (k2 === undefined) k2 = k;
30103
+ o[k2] = m[k];
30104
+ }));
30105
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
30106
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30107
+ }) : function(o, v) {
30108
+ o["default"] = v;
30109
+ });
30110
+ var __importStar = (this && this.__importStar) || (function () {
30111
+ var ownKeys = function(o) {
30112
+ ownKeys = Object.getOwnPropertyNames || function (o) {
30113
+ var ar = [];
30114
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30115
+ return ar;
30116
+ };
30117
+ return ownKeys(o);
30118
+ };
30119
+ return function (mod) {
30120
+ if (mod && mod.__esModule) return mod;
30121
+ var result = {};
30122
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
30123
+ __setModuleDefault(result, mod);
30124
+ return result;
30125
+ };
30126
+ })();
30127
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
30128
+ exports.checkTextSymbol = checkTextSymbol;
30129
+ const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
30130
+ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
30131
+ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
30132
+ // A text symbol, 'text'(001), is a character literal of type C. Unlike a plain
30133
+ // literal it does not convert when passed to a method parameter typed STRING,
30134
+ // the system reports it as not type-compatible. Returns true if an issue was reported.
30135
+ function checkTextSymbol(source, parameterType, input) {
30136
+ if (source === undefined || !(parameterType instanceof basic_1.StringType)) {
30137
+ return false;
30138
+ }
30139
+ const children = source.getChildren();
30140
+ const constant = children.length === 1 ? source.findDirectExpression(Expressions.Constant) : undefined;
30141
+ if ((constant === null || constant === void 0 ? void 0 : constant.findDirectExpression(Expressions.TextElementString)) === undefined) {
30142
+ return false;
30143
+ }
30144
+ const message = `Text symbol "${source.concatTokens()}" is a character literal, not type-compatible with a STRING parameter`;
30145
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, source.getFirstToken(), message));
30146
+ return true;
30147
+ }
30148
+ //# sourceMappingURL=_check_text_symbol.js.map
30149
+
30150
+ /***/ },
30151
+
30046
30152
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/attribute_chain.js"
30047
30153
  /*!********************************************************************************************!*\
30048
30154
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/attribute_chain.js ***!
@@ -33420,6 +33526,7 @@ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/
33420
33526
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
33421
33527
  const constant_1 = __webpack_require__(/*! ./constant */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/constant.js");
33422
33528
  const _check_offset_length_1 = __webpack_require__(/*! ./_check_offset_length */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/_check_offset_length.js");
33529
+ const _check_text_symbol_1 = __webpack_require__(/*! ./_check_text_symbol */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/_check_text_symbol.js");
33423
33530
  class MethodCallParam {
33424
33531
  static runSyntax(node, input, method) {
33425
33532
  if (!(node.get() instanceof Expressions.MethodCallParam)) {
@@ -33492,6 +33599,9 @@ class MethodCallParam {
33492
33599
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
33493
33600
  return;
33494
33601
  }
33602
+ else if ((0, _check_text_symbol_1.checkTextSymbol)(child, targetType, input)) {
33603
+ return;
33604
+ }
33495
33605
  else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(sourceType, targetType, child) === false) {
33496
33606
  const message = "Method parameter type not compatible";
33497
33607
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -33743,6 +33853,7 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
33743
33853
  const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_chain.js");
33744
33854
  const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
33745
33855
  const _check_offset_length_1 = __webpack_require__(/*! ./_check_offset_length */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/_check_offset_length.js");
33856
+ const _check_text_symbol_1 = __webpack_require__(/*! ./_check_text_symbol */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/_check_text_symbol.js");
33746
33857
  class MethodParameters {
33747
33858
  constructor() {
33748
33859
  this.requiredParameters = undefined;
@@ -33894,6 +34005,9 @@ class MethodParameters {
33894
34005
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
33895
34006
  continue;
33896
34007
  }
34008
+ else if ((0, _check_text_symbol_1.checkTextSymbol)(item.source, parameter.getType(), input)) {
34009
+ return;
34010
+ }
33897
34011
  else if (new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(item.sourceType, parameter.getType(), item.source) === false) {
33898
34012
  const message = "Method parameter type not compatible, " + item.name;
33899
34013
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -34912,6 +35026,13 @@ class Select {
34912
35026
  const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
34913
35027
  if (intoTable) {
34914
35028
  const inline = intoTable.findFirstExpression(Expressions.InlineData);
35029
+ if (inline
35030
+ && intoTable.findDirectTokenByText("INTO") !== undefined
35031
+ && intoTable.findDirectTokenByText("CORRESPONDING") !== undefined
35032
+ && !(0, version_1.releaseAtLeast)(input.scope.getRelease(), version_1.Release.v755)) {
35033
+ const message = "INTO CORRESPONDING FIELDS OF TABLE with an inline declaration requires 7.55";
35034
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
35035
+ }
34915
35036
  if (inline) {
34916
35037
  inline_data_1.InlineData.runSyntax(inline, input, this.buildTableType(fields, dbSources, input.scope, from));
34917
35038
  }
@@ -40074,6 +40195,9 @@ class CreateData {
40074
40195
  return;
40075
40196
  }
40076
40197
  }
40198
+ for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
40199
+ source_1.Source.runSyntax(s, input);
40200
+ }
40077
40201
  for (const t of node.findDirectExpressions(Expressions.Target)) {
40078
40202
  target_1.Target.runSyntax(t, input);
40079
40203
  }
@@ -43375,14 +43499,21 @@ class Loop {
43375
43499
  // https://github.com/abap2xlsx/abap2xlsx/issues/1341
43376
43500
  const keyName = node.findExpressionAfterToken("KEY");
43377
43501
  let key = undefined;
43378
- if ((keyName === null || keyName === void 0 ? void 0 : keyName.get()) instanceof Expressions.SimpleName) {
43379
- // it might be dynamic, in that case we cannot check anything
43380
- key = (_b = topType.getOptions().secondary) === null || _b === void 0 ? void 0 : _b.find(k => k.name.toUpperCase() === keyName.getFirstToken().getStr().toUpperCase());
43502
+ const name = (keyName === null || keyName === void 0 ? void 0 : keyName.get()) instanceof Expressions.SimpleName ? keyName.getFirstToken().getStr().toUpperCase() : undefined;
43503
+ // it might be dynamic, in that case we cannot check anything; and
43504
+ // primary_key is the predefined name of the primary key every table has
43505
+ if (name !== undefined && name !== "PRIMARY_KEY") {
43506
+ key = (_b = topType.getOptions().secondary) === null || _b === void 0 ? void 0 : _b.find(k => k.name.toUpperCase() === name);
43381
43507
  if (key === undefined) {
43382
43508
  const message = "Key " + (keyName === null || keyName === void 0 ? void 0 : keyName.concatTokens()) + " not found in table type";
43383
43509
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
43384
43510
  return;
43385
43511
  }
43512
+ if (cond.findDirectTokenByText("OR") !== undefined) {
43513
+ const message = "Loop, secondary key requires an optimizable WHERE, top-level OR not allowed";
43514
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
43515
+ return;
43516
+ }
43386
43517
  if (!(0, version_1.releaseAtLeast)(input.scope.getRelease(), version_1.Release.v740sp02)) {
43387
43518
  const compares = cond.findAllExpressionsRecursive(Expressions.ComponentCompare).map(c => c.concatTokens().toUpperCase());
43388
43519
  for (const keyField of key.keyFields) {
@@ -44045,6 +44176,7 @@ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/
44045
44176
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
44046
44177
  const dereference_1 = __webpack_require__(/*! ../expressions/dereference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dereference.js");
44047
44178
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
44179
+ const nodes_1 = __webpack_require__(/*! ../../nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
44048
44180
  class Move {
44049
44181
  runSyntax(node, input) {
44050
44182
  const targets = node.findDirectExpressions(Expressions.Target);
@@ -44076,6 +44208,13 @@ class Move {
44076
44208
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
44077
44209
  return;
44078
44210
  }
44211
+ if (inline === undefined
44212
+ && node.findDirectTokenByText("=") !== undefined
44213
+ && Move.isRefInferIntoGenericFieldSymbol(targets, source, targetType)) {
44214
+ const message = "REF #( ) cannot infer a type from a generic target, use REF data( ) or a named type";
44215
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, source.getFirstToken(), message));
44216
+ return;
44217
+ }
44079
44218
  if (node.findDirectExpression(Expressions.Dereference)) {
44080
44219
  sourceType = dereference_1.Dereference.runSyntax(node, sourceType, input);
44081
44220
  }
@@ -44099,6 +44238,26 @@ class Move {
44099
44238
  return;
44100
44239
  }
44101
44240
  }
44241
+ /** target = REF #( ... ), with the single target being a field symbol typed "any" or "data",
44242
+ * the type of REF # is inferred from the target, which is generic */
44243
+ static isRefInferIntoGenericFieldSymbol(targets, source, targetType) {
44244
+ var _a;
44245
+ if (targets.length !== 1 || source === undefined) {
44246
+ return false;
44247
+ }
44248
+ else if (!(targetType instanceof basic_1.AnyType) && !(targetType instanceof basic_1.DataType)) {
44249
+ return false;
44250
+ }
44251
+ const targetChildren = targets[0].getChildren();
44252
+ if (targetChildren.length !== 1 || !(targetChildren[0].get() instanceof Expressions.TargetFieldSymbol)) {
44253
+ return false;
44254
+ }
44255
+ const first = source.getFirstChild();
44256
+ if (!(first instanceof nodes_1.TokenNode) || first.getFirstToken().getStr().toUpperCase() !== "REF") {
44257
+ return false;
44258
+ }
44259
+ return ((_a = source.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.concatTokens()) === "#";
44260
+ }
44102
44261
  }
44103
44262
  exports.Move = Move;
44104
44263
  //# sourceMappingURL=move.js.map
@@ -49740,38 +49899,45 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
49740
49899
  exports.ArtifactsABAP = void 0;
49741
49900
  const Statements = __importStar(__webpack_require__(/*! ./2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
49742
49901
  const Expressions = __importStar(__webpack_require__(/*! ./2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
49743
- const combi_1 = __webpack_require__(/*! ./2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
49744
49902
  const Structures = __importStar(__webpack_require__(/*! ./3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js"));
49903
+ /*
49745
49904
  class List {
49746
- constructor() {
49747
- this.words = [];
49748
- }
49749
- add(keywords, source) {
49750
- for (const w of keywords) {
49751
- const index = this.find(w);
49752
- if (index >= 0) {
49753
- this.words[index].source.push(source);
49754
- }
49755
- else {
49756
- this.words.push({ word: w, source: [source] });
49757
- }
49758
- }
49759
- }
49760
- get() {
49761
- return this.words;
49905
+ private readonly words: IKeyword[];
49906
+
49907
+ public constructor() {
49908
+ this.words = [];
49909
+ }
49910
+
49911
+ public add(keywords: string[], source: string): void {
49912
+ for (const w of keywords) {
49913
+ const index = this.find(w);
49914
+ if (index >= 0) {
49915
+ this.words[index].source.push(source);
49916
+ } else {
49917
+ this.words.push({word: w, source: [source]});
49918
+ }
49762
49919
  }
49763
- find(keyword) {
49764
- for (let i = 0; i < this.words.length; i++) {
49765
- if (this.words[i].word === keyword) {
49766
- return i;
49767
- }
49768
- }
49769
- return -1;
49920
+ }
49921
+
49922
+ public get(): IKeyword[] {
49923
+ return this.words;
49924
+ }
49925
+
49926
+ private find(keyword: string): number {
49927
+ for (let i = 0; i < this.words.length; i++) {
49928
+ if (this.words[i].word === keyword) {
49929
+ return i;
49930
+ }
49770
49931
  }
49932
+ return -1;
49933
+ }
49771
49934
  }
49772
- function className(cla) {
49773
- return cla.constructor.name;
49935
+
49936
+
49937
+ function className(cla: any) {
49938
+ return cla.constructor.name;
49774
49939
  }
49940
+ */
49775
49941
  class ArtifactsABAP {
49776
49942
  static getStructures() {
49777
49943
  const ret = [];
@@ -49803,16 +49969,6 @@ class ArtifactsABAP {
49803
49969
  }
49804
49970
  return ret;
49805
49971
  }
49806
- static getKeywords() {
49807
- const list = new List();
49808
- for (const stat of this.getStatements()) {
49809
- list.add(combi_1.Combi.listKeywords(stat.getMatcher()), "statement_" + className(stat));
49810
- }
49811
- for (const expr of this.getExpressions()) {
49812
- list.add(combi_1.Combi.listKeywords(new expr().getRunnable()), "expression_" + className(expr));
49813
- }
49814
- return list.get();
49815
- }
49816
49972
  }
49817
49973
  exports.ArtifactsABAP = ArtifactsABAP;
49818
49974
  //# sourceMappingURL=artifacts.js.map
@@ -57050,7 +57206,7 @@ class DDIC {
57050
57206
  return new Types.PackedType(length, 0, { qualifiedName: qualifiedName });
57051
57207
  }
57052
57208
  else {
57053
- return new Types.PackedType(8, 0, { qualifiedName: qualifiedName });
57209
+ return new Types.PackedType(8, decimals !== null && decimals !== void 0 ? decimals : 0, { qualifiedName: qualifiedName });
57054
57210
  }
57055
57211
  case "C":
57056
57212
  if (length) {
@@ -61685,6 +61841,9 @@ class AbstractObject {
61685
61841
  this.old = [];
61686
61842
  this.dirty = false;
61687
61843
  }
61844
+ getDescription() {
61845
+ return undefined;
61846
+ }
61688
61847
  getParsingIssues() {
61689
61848
  return this.old;
61690
61849
  }
@@ -61875,9 +62034,6 @@ class UnknownObject extends _abstract_object_1.AbstractObject {
61875
62034
  allowNamespace: true,
61876
62035
  };
61877
62036
  }
61878
- getDescription() {
61879
- return undefined;
61880
- }
61881
62037
  getParsingIssues() {
61882
62038
  const pos = new position_1.Position(1, 1);
61883
62039
  const file = this.getFiles()[0];
@@ -61912,10 +62068,6 @@ class ABAPQueryFunctionalArea extends _abstract_object_1.AbstractObject {
61912
62068
  allowNamespace: true,
61913
62069
  };
61914
62070
  }
61915
- getDescription() {
61916
- // todo
61917
- return undefined;
61918
- }
61919
62071
  }
61920
62072
  exports.ABAPQueryFunctionalArea = ABAPQueryFunctionalArea;
61921
62073
  //# sourceMappingURL=abap_query_functional_area.js.map
@@ -61943,10 +62095,6 @@ class ABAPQueryQuery extends _abstract_object_1.AbstractObject {
61943
62095
  allowNamespace: true,
61944
62096
  };
61945
62097
  }
61946
- getDescription() {
61947
- // todo
61948
- return undefined;
61949
- }
61950
62098
  }
61951
62099
  exports.ABAPQueryQuery = ABAPQueryQuery;
61952
62100
  //# sourceMappingURL=abap_query_query.js.map
@@ -61974,10 +62122,6 @@ class ActivationVariant extends _abstract_object_1.AbstractObject {
61974
62122
  allowNamespace: true,
61975
62123
  };
61976
62124
  }
61977
- getDescription() {
61978
- // todo
61979
- return undefined;
61980
- }
61981
62125
  }
61982
62126
  exports.ActivationVariant = ActivationVariant;
61983
62127
  //# sourceMappingURL=activation_variant.js.map
@@ -62005,10 +62149,6 @@ class APIReleaseState extends _abstract_object_1.AbstractObject {
62005
62149
  allowNamespace: true,
62006
62150
  };
62007
62151
  }
62008
- getDescription() {
62009
- // todo
62010
- return undefined;
62011
- }
62012
62152
  }
62013
62153
  exports.APIReleaseState = APIReleaseState;
62014
62154
  //# sourceMappingURL=api_release_state.js.map
@@ -62036,10 +62176,6 @@ class ApplicationDescriptorsFiori extends _abstract_object_1.AbstractObject {
62036
62176
  allowNamespace: true,
62037
62177
  };
62038
62178
  }
62039
- getDescription() {
62040
- // todo
62041
- return undefined;
62042
- }
62043
62179
  }
62044
62180
  exports.ApplicationDescriptorsFiori = ApplicationDescriptorsFiori;
62045
62181
  //# sourceMappingURL=application_descriptors_fiori.js.map
@@ -62067,10 +62203,6 @@ class ApplicationJobCatalogEntry extends _abstract_object_1.AbstractObject {
62067
62203
  allowNamespace: true,
62068
62204
  };
62069
62205
  }
62070
- getDescription() {
62071
- // todo
62072
- return undefined;
62073
- }
62074
62206
  }
62075
62207
  exports.ApplicationJobCatalogEntry = ApplicationJobCatalogEntry;
62076
62208
  //# sourceMappingURL=application_job_catalog_entry.js.map
@@ -62098,10 +62230,6 @@ class ApplicationJobTemplate extends _abstract_object_1.AbstractObject {
62098
62230
  allowNamespace: true,
62099
62231
  };
62100
62232
  }
62101
- getDescription() {
62102
- // todo
62103
- return undefined;
62104
- }
62105
62233
  }
62106
62234
  exports.ApplicationJobTemplate = ApplicationJobTemplate;
62107
62235
  //# sourceMappingURL=application_job_template.js.map
@@ -62129,10 +62257,6 @@ class ApplicationLogObject extends _abstract_object_1.AbstractObject {
62129
62257
  allowNamespace: true,
62130
62258
  };
62131
62259
  }
62132
- getDescription() {
62133
- // todo
62134
- return undefined;
62135
- }
62136
62260
  }
62137
62261
  exports.ApplicationLogObject = ApplicationLogObject;
62138
62262
  //# sourceMappingURL=application_log_object.js.map
@@ -62160,10 +62284,6 @@ class AssignmentServiceToAuthorizationGroup extends _abstract_object_1.AbstractO
62160
62284
  allowNamespace: true,
62161
62285
  };
62162
62286
  }
62163
- getDescription() {
62164
- // todo
62165
- return undefined;
62166
- }
62167
62287
  }
62168
62288
  exports.AssignmentServiceToAuthorizationGroup = AssignmentServiceToAuthorizationGroup;
62169
62289
  //# sourceMappingURL=assignment_service_to_authorization_group.js.map
@@ -62191,10 +62311,6 @@ class ATCCheckCategory extends _abstract_object_1.AbstractObject {
62191
62311
  allowNamespace: true,
62192
62312
  };
62193
62313
  }
62194
- getDescription() {
62195
- // todo
62196
- return undefined;
62197
- }
62198
62314
  }
62199
62315
  exports.ATCCheckCategory = ATCCheckCategory;
62200
62316
  //# sourceMappingURL=atc_check_category.js.map
@@ -62222,10 +62338,6 @@ class ATCCheckObject extends _abstract_object_1.AbstractObject {
62222
62338
  allowNamespace: true,
62223
62339
  };
62224
62340
  }
62225
- getDescription() {
62226
- // todo
62227
- return undefined;
62228
- }
62229
62341
  }
62230
62342
  exports.ATCCheckObject = ATCCheckObject;
62231
62343
  //# sourceMappingURL=atc_check_object.js.map
@@ -62253,10 +62365,6 @@ class ATCCheckVariant extends _abstract_object_1.AbstractObject {
62253
62365
  allowNamespace: true,
62254
62366
  };
62255
62367
  }
62256
- getDescription() {
62257
- // todo
62258
- return undefined;
62259
- }
62260
62368
  }
62261
62369
  exports.ATCCheckVariant = ATCCheckVariant;
62262
62370
  //# sourceMappingURL=atc_check_variant.js.map
@@ -62290,10 +62398,6 @@ class AuthorizationCheckField extends _abstract_object_1.AbstractObject {
62290
62398
  this.parsedXML = undefined;
62291
62399
  super.setDirty();
62292
62400
  }
62293
- getDescription() {
62294
- // todo
62295
- return undefined;
62296
- }
62297
62401
  getDataElementName() {
62298
62402
  var _a;
62299
62403
  this.parse();
@@ -62366,10 +62470,6 @@ class AuthorizationGroup extends _abstract_object_1.AbstractObject {
62366
62470
  allowNamespace: true,
62367
62471
  };
62368
62472
  }
62369
- getDescription() {
62370
- // todo
62371
- return undefined;
62372
- }
62373
62473
  }
62374
62474
  exports.AuthorizationGroup = AuthorizationGroup;
62375
62475
  //# sourceMappingURL=authorization_group.js.map
@@ -62397,10 +62497,6 @@ class AuthorizationObject extends _abstract_object_1.AbstractObject {
62397
62497
  allowNamespace: true,
62398
62498
  };
62399
62499
  }
62400
- getDescription() {
62401
- // todo
62402
- return undefined;
62403
- }
62404
62500
  }
62405
62501
  exports.AuthorizationObject = AuthorizationObject;
62406
62502
  //# sourceMappingURL=authorization_object.js.map
@@ -62428,10 +62524,6 @@ class AuthorizationObjectClass extends _abstract_object_1.AbstractObject {
62428
62524
  allowNamespace: false,
62429
62525
  };
62430
62526
  }
62431
- getDescription() {
62432
- // todo
62433
- return undefined;
62434
- }
62435
62527
  }
62436
62528
  exports.AuthorizationObjectClass = AuthorizationObjectClass;
62437
62529
  //# sourceMappingURL=authorization_object_class.js.map
@@ -62459,10 +62551,6 @@ class AuthorizationObjectExtension extends _abstract_object_1.AbstractObject {
62459
62551
  allowNamespace: true,
62460
62552
  };
62461
62553
  }
62462
- getDescription() {
62463
- // todo
62464
- return undefined;
62465
- }
62466
62554
  }
62467
62555
  exports.AuthorizationObjectExtension = AuthorizationObjectExtension;
62468
62556
  //# sourceMappingURL=authorization_object_extension.js.map
@@ -62490,10 +62578,6 @@ class BADIDefinition extends _abstract_object_1.AbstractObject {
62490
62578
  allowNamespace: true,
62491
62579
  };
62492
62580
  }
62493
- getDescription() {
62494
- // todo
62495
- return undefined;
62496
- }
62497
62581
  }
62498
62582
  exports.BADIDefinition = BADIDefinition;
62499
62583
  //# sourceMappingURL=badi_definition.js.map
@@ -62525,10 +62609,6 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
62525
62609
  allowNamespace: true,
62526
62610
  };
62527
62611
  }
62528
- getDescription() {
62529
- // todo
62530
- return undefined;
62531
- }
62532
62612
  setDirty() {
62533
62613
  this.parsedData = undefined;
62534
62614
  super.setDirty();
@@ -62599,10 +62679,6 @@ class BRFPlusSystemApplication extends _abstract_object_1.AbstractObject {
62599
62679
  allowNamespace: true,
62600
62680
  };
62601
62681
  }
62602
- getDescription() {
62603
- // todo
62604
- return undefined;
62605
- }
62606
62682
  }
62607
62683
  exports.BRFPlusSystemApplication = BRFPlusSystemApplication;
62608
62684
  //# sourceMappingURL=brf_plus_system_application.js.map
@@ -62630,10 +62706,6 @@ class BSPApplication extends _abstract_object_1.AbstractObject {
62630
62706
  allowNamespace: true,
62631
62707
  };
62632
62708
  }
62633
- getDescription() {
62634
- // todo
62635
- return undefined;
62636
- }
62637
62709
  }
62638
62710
  exports.BSPApplication = BSPApplication;
62639
62711
  //# sourceMappingURL=bsp_application.js.map
@@ -62661,10 +62733,6 @@ class BusinessAddInImplementation extends _abstract_object_1.AbstractObject {
62661
62733
  allowNamespace: true,
62662
62734
  };
62663
62735
  }
62664
- getDescription() {
62665
- // todo
62666
- return undefined;
62667
- }
62668
62736
  }
62669
62737
  exports.BusinessAddInImplementation = BusinessAddInImplementation;
62670
62738
  //# sourceMappingURL=business_add_in_implementation.js.map
@@ -62692,10 +62760,6 @@ class BusinessCatalog extends _abstract_object_1.AbstractObject {
62692
62760
  allowNamespace: true,
62693
62761
  };
62694
62762
  }
62695
- getDescription() {
62696
- // todo
62697
- return undefined;
62698
- }
62699
62763
  }
62700
62764
  exports.BusinessCatalog = BusinessCatalog;
62701
62765
  //# sourceMappingURL=business_catalog.js.map
@@ -62723,10 +62787,6 @@ class BusinessCatalogAppAssignment extends _abstract_object_1.AbstractObject {
62723
62787
  allowNamespace: true,
62724
62788
  };
62725
62789
  }
62726
- getDescription() {
62727
- // todo
62728
- return undefined;
62729
- }
62730
62790
  }
62731
62791
  exports.BusinessCatalogAppAssignment = BusinessCatalogAppAssignment;
62732
62792
  //# sourceMappingURL=business_catalog_app_assignment.js.map
@@ -62754,10 +62814,6 @@ class BusinessConfigurationMaintenanceObject extends _abstract_object_1.Abstract
62754
62814
  allowNamespace: true,
62755
62815
  };
62756
62816
  }
62757
- getDescription() {
62758
- // todo
62759
- return undefined;
62760
- }
62761
62817
  }
62762
62818
  exports.BusinessConfigurationMaintenanceObject = BusinessConfigurationMaintenanceObject;
62763
62819
  //# sourceMappingURL=business_configuration_maintenance_object.js.map
@@ -62785,10 +62841,6 @@ class BusinessConfigurationSet extends _abstract_object_1.AbstractObject {
62785
62841
  allowNamespace: true,
62786
62842
  };
62787
62843
  }
62788
- getDescription() {
62789
- // todo
62790
- return undefined;
62791
- }
62792
62844
  }
62793
62845
  exports.BusinessConfigurationSet = BusinessConfigurationSet;
62794
62846
  //# sourceMappingURL=business_configuration_set.js.map
@@ -62816,10 +62868,6 @@ class BusinessFunctionAssignment extends _abstract_object_1.AbstractObject {
62816
62868
  allowNamespace: true,
62817
62869
  };
62818
62870
  }
62819
- getDescription() {
62820
- // todo
62821
- return undefined;
62822
- }
62823
62871
  }
62824
62872
  exports.BusinessFunctionAssignment = BusinessFunctionAssignment;
62825
62873
  //# sourceMappingURL=business_function_assignment.js.map
@@ -62847,10 +62895,6 @@ class BusinessFunctionSetAssignment extends _abstract_object_1.AbstractObject {
62847
62895
  allowNamespace: true,
62848
62896
  };
62849
62897
  }
62850
- getDescription() {
62851
- // todo
62852
- return undefined;
62853
- }
62854
62898
  }
62855
62899
  exports.BusinessFunctionSetAssignment = BusinessFunctionSetAssignment;
62856
62900
  //# sourceMappingURL=business_function_set_assignment.js.map
@@ -62878,10 +62922,6 @@ class BusinessObjectModel extends _abstract_object_1.AbstractObject {
62878
62922
  allowNamespace: true,
62879
62923
  };
62880
62924
  }
62881
- getDescription() {
62882
- // todo
62883
- return undefined;
62884
- }
62885
62925
  }
62886
62926
  exports.BusinessObjectModel = BusinessObjectModel;
62887
62927
  //# sourceMappingURL=business_object_model.js.map
@@ -62909,10 +62949,6 @@ class BusinessObjectType extends _abstract_object_1.AbstractObject {
62909
62949
  allowNamespace: true,
62910
62950
  };
62911
62951
  }
62912
- getDescription() {
62913
- // todo
62914
- return undefined;
62915
- }
62916
62952
  }
62917
62953
  exports.BusinessObjectType = BusinessObjectType;
62918
62954
  //# sourceMappingURL=business_object_type.js.map
@@ -62940,10 +62976,6 @@ class CDSEntityBuffer extends _abstract_object_1.AbstractObject {
62940
62976
  allowNamespace: true,
62941
62977
  };
62942
62978
  }
62943
- getDescription() {
62944
- // todo
62945
- return undefined;
62946
- }
62947
62979
  }
62948
62980
  exports.CDSEntityBuffer = CDSEntityBuffer;
62949
62981
  //# sourceMappingURL=cds_entity_buffer.js.map
@@ -62977,6 +63009,11 @@ class CDSMetadataExtension extends _abstract_object_1.AbstractObject {
62977
63009
  allowNamespace: true,
62978
63010
  };
62979
63011
  }
63012
+ setDirty() {
63013
+ this.parsedData = undefined;
63014
+ this.parserError = undefined;
63015
+ super.setDirty();
63016
+ }
62980
63017
  hasParserError() {
62981
63018
  return this.parserError;
62982
63019
  }
@@ -62995,10 +63032,6 @@ class CDSMetadataExtension extends _abstract_object_1.AbstractObject {
62995
63032
  this.dirty = false;
62996
63033
  return { updated: true, runtime: Date.now() - start };
62997
63034
  }
62998
- getDescription() {
62999
- // todo
63000
- return undefined;
63001
- }
63002
63035
  findSourceFile() {
63003
63036
  return this.getFiles().find(f => f.getFilename().endsWith(".asddlxs") || f.getFilename().endsWith(".acds"));
63004
63037
  }
@@ -63029,10 +63062,6 @@ class CDSType extends _abstract_object_1.AbstractObject {
63029
63062
  allowNamespace: true,
63030
63063
  };
63031
63064
  }
63032
- getDescription() {
63033
- // todo
63034
- return undefined;
63035
- }
63036
63065
  }
63037
63066
  exports.CDSType = CDSType;
63038
63067
  //# sourceMappingURL=cds_type.js.map
@@ -63060,10 +63089,6 @@ class ChangeDocument extends _abstract_object_1.AbstractObject {
63060
63089
  allowNamespace: true,
63061
63090
  };
63062
63091
  }
63063
- getDescription() {
63064
- // todo
63065
- return undefined;
63066
- }
63067
63092
  }
63068
63093
  exports.ChangeDocument = ChangeDocument;
63069
63094
  //# sourceMappingURL=change_document.js.map
@@ -63091,10 +63116,6 @@ class ChapterOfBookStructure extends _abstract_object_1.AbstractObject {
63091
63116
  allowNamespace: true,
63092
63117
  };
63093
63118
  }
63094
- getDescription() {
63095
- // todo
63096
- return undefined;
63097
- }
63098
63119
  }
63099
63120
  exports.ChapterOfBookStructure = ChapterOfBookStructure;
63100
63121
  //# sourceMappingURL=chapter_of_book_structure.js.map
@@ -63122,10 +63143,6 @@ class CheckpointGroup extends _abstract_object_1.AbstractObject {
63122
63143
  allowNamespace: true,
63123
63144
  };
63124
63145
  }
63125
- getDescription() {
63126
- // todo
63127
- return undefined;
63128
- }
63129
63146
  }
63130
63147
  exports.CheckpointGroup = CheckpointGroup;
63131
63148
  //# sourceMappingURL=checkpoint_group.js.map
@@ -63273,10 +63290,6 @@ class Classification extends _abstract_object_1.AbstractObject {
63273
63290
  allowNamespace: true,
63274
63291
  };
63275
63292
  }
63276
- getDescription() {
63277
- // todo
63278
- return undefined;
63279
- }
63280
63293
  }
63281
63294
  exports.Classification = Classification;
63282
63295
  //# sourceMappingURL=classification.js.map
@@ -63304,10 +63317,6 @@ class CommunicationScenario extends _abstract_object_1.AbstractObject {
63304
63317
  allowNamespace: true,
63305
63318
  };
63306
63319
  }
63307
- getDescription() {
63308
- // todo
63309
- return undefined;
63310
- }
63311
63320
  }
63312
63321
  exports.CommunicationScenario = CommunicationScenario;
63313
63322
  //# sourceMappingURL=communication_scenario.js.map
@@ -63335,10 +63344,6 @@ class CompositeEnhancementImplementation extends _abstract_object_1.AbstractObje
63335
63344
  allowNamespace: true,
63336
63345
  };
63337
63346
  }
63338
- getDescription() {
63339
- // todo
63340
- return undefined;
63341
- }
63342
63347
  }
63343
63348
  exports.CompositeEnhancementImplementation = CompositeEnhancementImplementation;
63344
63349
  //# sourceMappingURL=composite_enhancement_implementation.js.map
@@ -63366,10 +63371,6 @@ class CompositeEnhancementSpot extends _abstract_object_1.AbstractObject {
63366
63371
  allowNamespace: true,
63367
63372
  };
63368
63373
  }
63369
- getDescription() {
63370
- // todo
63371
- return undefined;
63372
- }
63373
63374
  }
63374
63375
  exports.CompositeEnhancementSpot = CompositeEnhancementSpot;
63375
63376
  //# sourceMappingURL=composite_enhancement_spot.js.map
@@ -63398,10 +63399,6 @@ class ConceptsOfPackage extends _abstract_object_1.AbstractObject {
63398
63399
  customRegex: new RegExp(/^(\/[A-Z_\d]{3,8}\/)?[A-Z_-\d<> ]+$/i),
63399
63400
  };
63400
63401
  }
63401
- getDescription() {
63402
- // todo
63403
- return undefined;
63404
- }
63405
63402
  }
63406
63403
  exports.ConceptsOfPackage = ConceptsOfPackage;
63407
63404
  //# sourceMappingURL=concepts_of_package.js.map
@@ -63429,10 +63426,6 @@ class CustomDataBrowserObject extends _abstract_object_1.AbstractObject {
63429
63426
  allowNamespace: true,
63430
63427
  };
63431
63428
  }
63432
- getDescription() {
63433
- // todo
63434
- return undefined;
63435
- }
63436
63429
  }
63437
63430
  exports.CustomDataBrowserObject = CustomDataBrowserObject;
63438
63431
  //# sourceMappingURL=custom_data_browser_object.js.map
@@ -63460,10 +63453,6 @@ class CustomerEnhancementProject extends _abstract_object_1.AbstractObject {
63460
63453
  allowNamespace: true,
63461
63454
  };
63462
63455
  }
63463
- getDescription() {
63464
- // todo
63465
- return undefined;
63466
- }
63467
63456
  }
63468
63457
  exports.CustomerEnhancementProject = CustomerEnhancementProject;
63469
63458
  //# sourceMappingURL=customer_enhancement_project.js.map
@@ -63491,10 +63480,6 @@ class CustomizingAttributes extends _abstract_object_1.AbstractObject {
63491
63480
  allowNamespace: true,
63492
63481
  };
63493
63482
  }
63494
- getDescription() {
63495
- // todo
63496
- return undefined;
63497
- }
63498
63483
  }
63499
63484
  exports.CustomizingAttributes = CustomizingAttributes;
63500
63485
  //# sourceMappingURL=customizing_attributes.js.map
@@ -63522,10 +63507,6 @@ class CustomizingImgActivity extends _abstract_object_1.AbstractObject {
63522
63507
  allowNamespace: true,
63523
63508
  };
63524
63509
  }
63525
- getDescription() {
63526
- // todo
63527
- return undefined;
63528
- }
63529
63510
  }
63530
63511
  exports.CustomizingImgActivity = CustomizingImgActivity;
63531
63512
  //# sourceMappingURL=customizing_img_activity.js.map
@@ -63553,10 +63534,6 @@ class CustomizingTransaction extends _abstract_object_1.AbstractObject {
63553
63534
  allowNamespace: true,
63554
63535
  };
63555
63536
  }
63556
- getDescription() {
63557
- // todo
63558
- return undefined;
63559
- }
63560
63537
  }
63561
63538
  exports.CustomizingTransaction = CustomizingTransaction;
63562
63539
  //# sourceMappingURL=customizing_transaction.js.map
@@ -63584,10 +63561,6 @@ class DataControl extends _abstract_object_1.AbstractObject {
63584
63561
  allowNamespace: true,
63585
63562
  };
63586
63563
  }
63587
- getDescription() {
63588
- // todo
63589
- return undefined;
63590
- }
63591
63564
  }
63592
63565
  exports.DataControl = DataControl;
63593
63566
  //# sourceMappingURL=data_control.js.map
@@ -64156,10 +64129,6 @@ class DatastoreObject extends _abstract_object_1.AbstractObject {
64156
64129
  allowNamespace: true,
64157
64130
  };
64158
64131
  }
64159
- getDescription() {
64160
- // todo
64161
- return undefined;
64162
- }
64163
64132
  }
64164
64133
  exports.DatastoreObject = DatastoreObject;
64165
64134
  //# sourceMappingURL=datastore_object.js.map
@@ -64187,10 +64156,6 @@ class DialogModule extends _abstract_object_1.AbstractObject {
64187
64156
  allowNamespace: true,
64188
64157
  };
64189
64158
  }
64190
- getDescription() {
64191
- // todo
64192
- return undefined;
64193
- }
64194
64159
  }
64195
64160
  exports.DialogModule = DialogModule;
64196
64161
  //# sourceMappingURL=dialog_module.js.map
@@ -64218,10 +64183,6 @@ class Documentation extends _abstract_object_1.AbstractObject {
64218
64183
  allowNamespace: true,
64219
64184
  };
64220
64185
  }
64221
- getDescription() {
64222
- // todo
64223
- return undefined;
64224
- }
64225
64186
  }
64226
64187
  exports.Documentation = Documentation;
64227
64188
  //# sourceMappingURL=documentation.js.map
@@ -64425,11 +64386,13 @@ class Domain extends _abstract_object_1.AbstractObject {
64425
64386
  getFixedValues() {
64426
64387
  var _a;
64427
64388
  var _b;
64389
+ this.parse();
64428
64390
  return (_b = (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : [];
64429
64391
  }
64430
64392
  getFixedValuesTranslations() {
64431
64393
  var _a;
64432
64394
  var _b;
64395
+ this.parse();
64433
64396
  return (_b = (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.valuesTranslations) !== null && _b !== void 0 ? _b : [];
64434
64397
  }
64435
64398
  getAFFFile() {
@@ -64462,10 +64425,6 @@ class EcattTestConfiguration extends _abstract_object_1.AbstractObject {
64462
64425
  allowNamespace: true,
64463
64426
  };
64464
64427
  }
64465
- getDescription() {
64466
- // todo
64467
- return undefined;
64468
- }
64469
64428
  }
64470
64429
  exports.EcattTestConfiguration = EcattTestConfiguration;
64471
64430
  //# sourceMappingURL=ecatt_test_configuration.js.map
@@ -64493,10 +64452,6 @@ class EcattTestDataContainer extends _abstract_object_1.AbstractObject {
64493
64452
  allowNamespace: true,
64494
64453
  };
64495
64454
  }
64496
- getDescription() {
64497
- // todo
64498
- return undefined;
64499
- }
64500
64455
  }
64501
64456
  exports.EcattTestDataContainer = EcattTestDataContainer;
64502
64457
  //# sourceMappingURL=ecatt_test_data_container.js.map
@@ -64524,10 +64479,6 @@ class EcattTestScript extends _abstract_object_1.AbstractObject {
64524
64479
  allowNamespace: true,
64525
64480
  };
64526
64481
  }
64527
- getDescription() {
64528
- // todo
64529
- return undefined;
64530
- }
64531
64482
  }
64532
64483
  exports.EcattTestScript = EcattTestScript;
64533
64484
  //# sourceMappingURL=ecatt_test_script.js.map
@@ -64555,10 +64506,6 @@ class EmailTemplate extends _abstract_object_1.AbstractObject {
64555
64506
  allowNamespace: true,
64556
64507
  };
64557
64508
  }
64558
- getDescription() {
64559
- // todo
64560
- return undefined;
64561
- }
64562
64509
  }
64563
64510
  exports.EmailTemplate = EmailTemplate;
64564
64511
  //# sourceMappingURL=email_template.js.map
@@ -64640,10 +64587,6 @@ class EnhancementSpot extends _abstract_object_1.AbstractObject {
64640
64587
  getType() {
64641
64588
  return "ENHS";
64642
64589
  }
64643
- getDescription() {
64644
- // todo
64645
- return undefined;
64646
- }
64647
64590
  getAllowedNaming() {
64648
64591
  return {
64649
64592
  maxLength: 30,
@@ -64703,10 +64646,6 @@ class EntityType extends _abstract_object_1.AbstractObject {
64703
64646
  allowNamespace: true,
64704
64647
  };
64705
64648
  }
64706
- getDescription() {
64707
- // todo
64708
- return undefined;
64709
- }
64710
64649
  }
64711
64650
  exports.EntityType = EntityType;
64712
64651
  //# sourceMappingURL=entity_type.js.map
@@ -64734,10 +64673,6 @@ class EventBinding extends _abstract_object_1.AbstractObject {
64734
64673
  allowNamespace: true,
64735
64674
  };
64736
64675
  }
64737
- getDescription() {
64738
- // todo
64739
- return undefined;
64740
- }
64741
64676
  }
64742
64677
  exports.EventBinding = EventBinding;
64743
64678
  //# sourceMappingURL=event_binding.js.map
@@ -64765,10 +64700,6 @@ class EventConsumer extends _abstract_object_1.AbstractObject {
64765
64700
  allowNamespace: true,
64766
64701
  };
64767
64702
  }
64768
- getDescription() {
64769
- // todo
64770
- return undefined;
64771
- }
64772
64703
  }
64773
64704
  exports.EventConsumer = EventConsumer;
64774
64705
  //# sourceMappingURL=event_consumer.js.map
@@ -64860,10 +64791,6 @@ class FieldCatalog extends _abstract_object_1.AbstractObject {
64860
64791
  allowNamespace: true,
64861
64792
  };
64862
64793
  }
64863
- getDescription() {
64864
- // todo
64865
- return undefined;
64866
- }
64867
64794
  }
64868
64795
  exports.FieldCatalog = FieldCatalog;
64869
64796
  //# sourceMappingURL=field_catalog.js.map
@@ -64891,10 +64818,6 @@ class FormObjectForm extends _abstract_object_1.AbstractObject {
64891
64818
  allowNamespace: true,
64892
64819
  };
64893
64820
  }
64894
- getDescription() {
64895
- // todo
64896
- return undefined;
64897
- }
64898
64821
  }
64899
64822
  exports.FormObjectForm = FormObjectForm;
64900
64823
  //# sourceMappingURL=form_object_form.js.map
@@ -64922,10 +64845,6 @@ class FormObjectInterface extends _abstract_object_1.AbstractObject {
64922
64845
  allowNamespace: true,
64923
64846
  };
64924
64847
  }
64925
- getDescription() {
64926
- // todo
64927
- return undefined;
64928
- }
64929
64848
  }
64930
64849
  exports.FormObjectInterface = FormObjectInterface;
64931
64850
  //# sourceMappingURL=form_object_interface.js.map
@@ -64953,10 +64872,6 @@ class FormatType extends _abstract_object_1.AbstractObject {
64953
64872
  allowNamespace: true,
64954
64873
  };
64955
64874
  }
64956
- getDescription() {
64957
- // todo
64958
- return undefined;
64959
- }
64960
64875
  }
64961
64876
  exports.FormatType = FormatType;
64962
64877
  //# sourceMappingURL=format_type.js.map
@@ -65189,10 +65104,6 @@ class GatewayModel extends _abstract_object_1.AbstractObject {
65189
65104
  allowNamespace: true,
65190
65105
  };
65191
65106
  }
65192
- getDescription() {
65193
- // todo
65194
- return undefined;
65195
- }
65196
65107
  }
65197
65108
  exports.GatewayModel = GatewayModel;
65198
65109
  //# sourceMappingURL=gateway_model.js.map
@@ -65220,10 +65131,6 @@ class GatewayModelMetadata extends _abstract_object_1.AbstractObject {
65220
65131
  allowNamespace: true,
65221
65132
  };
65222
65133
  }
65223
- getDescription() {
65224
- // todo
65225
- return undefined;
65226
- }
65227
65134
  }
65228
65135
  exports.GatewayModelMetadata = GatewayModelMetadata;
65229
65136
  //# sourceMappingURL=gateway_model_metadata.js.map
@@ -65251,10 +65158,6 @@ class GatewayODataGroupAndAssignment extends _abstract_object_1.AbstractObject {
65251
65158
  allowNamespace: true,
65252
65159
  };
65253
65160
  }
65254
- getDescription() {
65255
- // todo
65256
- return undefined;
65257
- }
65258
65161
  }
65259
65162
  exports.GatewayODataGroupAndAssignment = GatewayODataGroupAndAssignment;
65260
65163
  //# sourceMappingURL=gateway_odata_group_and_assignment.js.map
@@ -65282,10 +65185,6 @@ class GatewayProject extends _abstract_object_1.AbstractObject {
65282
65185
  allowNamespace: true,
65283
65186
  };
65284
65187
  }
65285
- getDescription() {
65286
- // todo
65287
- return undefined;
65288
- }
65289
65188
  }
65290
65189
  exports.GatewayProject = GatewayProject;
65291
65190
  //# sourceMappingURL=gateway_project.js.map
@@ -65313,10 +65212,6 @@ class GatewayService extends _abstract_object_1.AbstractObject {
65313
65212
  allowNamespace: true,
65314
65213
  };
65315
65214
  }
65316
- getDescription() {
65317
- // todo
65318
- return undefined;
65319
- }
65320
65215
  }
65321
65216
  exports.GatewayService = GatewayService;
65322
65217
  //# sourceMappingURL=gateway_service.js.map
@@ -65344,10 +65239,6 @@ class GatewayServiceGroupsMetadata extends _abstract_object_1.AbstractObject {
65344
65239
  allowNamespace: true,
65345
65240
  };
65346
65241
  }
65347
- getDescription() {
65348
- // todo
65349
- return undefined;
65350
- }
65351
65242
  }
65352
65243
  exports.GatewayServiceGroupsMetadata = GatewayServiceGroupsMetadata;
65353
65244
  //# sourceMappingURL=gateway_service_groups_metadata.js.map
@@ -65375,10 +65266,6 @@ class GatewayVocabularyAnnotation extends _abstract_object_1.AbstractObject {
65375
65266
  allowNamespace: true,
65376
65267
  };
65377
65268
  }
65378
- getDescription() {
65379
- // todo
65380
- return undefined;
65381
- }
65382
65269
  }
65383
65270
  exports.GatewayVocabularyAnnotation = GatewayVocabularyAnnotation;
65384
65271
  //# sourceMappingURL=gateway_vocabulary_annotation.js.map
@@ -65406,10 +65293,6 @@ class GeneralHierarchyStorageExtrensionName extends _abstract_object_1.AbstractO
65406
65293
  allowNamespace: true,
65407
65294
  };
65408
65295
  }
65409
- getDescription() {
65410
- // todo
65411
- return undefined;
65412
- }
65413
65296
  }
65414
65297
  exports.GeneralHierarchyStorageExtrensionName = GeneralHierarchyStorageExtrensionName;
65415
65298
  //# sourceMappingURL=general_hierarchy_storage_extrension_name.js.map
@@ -65437,10 +65320,6 @@ class GeneralStorageStructure extends _abstract_object_1.AbstractObject {
65437
65320
  allowNamespace: true,
65438
65321
  };
65439
65322
  }
65440
- getDescription() {
65441
- // todo
65442
- return undefined;
65443
- }
65444
65323
  }
65445
65324
  exports.GeneralStorageStructure = GeneralStorageStructure;
65446
65325
  //# sourceMappingURL=general_storage_structure.js.map
@@ -65468,10 +65347,6 @@ class GeneralText extends _abstract_object_1.AbstractObject {
65468
65347
  allowNamespace: true,
65469
65348
  };
65470
65349
  }
65471
- getDescription() {
65472
- // todo
65473
- return undefined;
65474
- }
65475
65350
  }
65476
65351
  exports.GeneralText = GeneralText;
65477
65352
  //# sourceMappingURL=general_text.js.map
@@ -65499,10 +65374,6 @@ class HttpService extends _abstract_object_1.AbstractObject {
65499
65374
  allowNamespace: true,
65500
65375
  };
65501
65376
  }
65502
- getDescription() {
65503
- // todo
65504
- return undefined;
65505
- }
65506
65377
  }
65507
65378
  exports.HttpService = HttpService;
65508
65379
  //# sourceMappingURL=http_service.js.map
@@ -65530,10 +65401,6 @@ class IACBinaryData extends _abstract_object_1.AbstractObject {
65530
65401
  allowNamespace: true,
65531
65402
  };
65532
65403
  }
65533
- getDescription() {
65534
- // todo
65535
- return undefined;
65536
- }
65537
65404
  }
65538
65405
  exports.IACBinaryData = IACBinaryData;
65539
65406
  //# sourceMappingURL=iac_binary_data.js.map
@@ -65561,10 +65428,6 @@ class IACLanguageResource extends _abstract_object_1.AbstractObject {
65561
65428
  allowNamespace: true,
65562
65429
  };
65563
65430
  }
65564
- getDescription() {
65565
- // todo
65566
- return undefined;
65567
- }
65568
65431
  }
65569
65432
  exports.IACLanguageResource = IACLanguageResource;
65570
65433
  //# sourceMappingURL=iac_language_resource.js.map
@@ -65592,10 +65455,6 @@ class IACService extends _abstract_object_1.AbstractObject {
65592
65455
  allowNamespace: true,
65593
65456
  };
65594
65457
  }
65595
- getDescription() {
65596
- // todo
65597
- return undefined;
65598
- }
65599
65458
  }
65600
65459
  exports.IACService = IACService;
65601
65460
  //# sourceMappingURL=iac_service.js.map
@@ -65623,10 +65482,6 @@ class IACTemplate extends _abstract_object_1.AbstractObject {
65623
65482
  allowNamespace: true,
65624
65483
  };
65625
65484
  }
65626
- getDescription() {
65627
- // todo
65628
- return undefined;
65629
- }
65630
65485
  }
65631
65486
  exports.IACTemplate = IACTemplate;
65632
65487
  //# sourceMappingURL=iac_template.js.map
@@ -65654,10 +65509,6 @@ class IAMApp extends _abstract_object_1.AbstractObject {
65654
65509
  allowNamespace: true,
65655
65510
  };
65656
65511
  }
65657
- getDescription() {
65658
- // todo
65659
- return undefined;
65660
- }
65661
65512
  }
65662
65513
  exports.IAMApp = IAMApp;
65663
65514
  //# sourceMappingURL=iam_app.js.map
@@ -65690,10 +65541,6 @@ class ICFService extends _abstract_object_1.AbstractObject {
65690
65541
  this.parsedXML = undefined;
65691
65542
  super.setDirty();
65692
65543
  }
65693
- getDescription() {
65694
- // todo
65695
- return undefined;
65696
- }
65697
65544
  getURL() {
65698
65545
  var _a;
65699
65546
  this.parse();
@@ -65755,10 +65602,6 @@ class Idoc extends _abstract_object_1.AbstractObject {
65755
65602
  allowNamespace: true,
65756
65603
  };
65757
65604
  }
65758
- getDescription() {
65759
- // todo
65760
- return undefined;
65761
- }
65762
65605
  }
65763
65606
  exports.Idoc = Idoc;
65764
65607
  //# sourceMappingURL=idoc.js.map
@@ -65786,10 +65629,6 @@ class IdocExtension extends _abstract_object_1.AbstractObject {
65786
65629
  allowNamespace: false,
65787
65630
  };
65788
65631
  }
65789
- getDescription() {
65790
- // todo
65791
- return undefined;
65792
- }
65793
65632
  }
65794
65633
  exports.IdocExtension = IdocExtension;
65795
65634
  //# sourceMappingURL=idoc_extension.js.map
@@ -65817,10 +65656,6 @@ class InboundService extends _abstract_object_1.AbstractObject {
65817
65656
  allowNamespace: true,
65818
65657
  };
65819
65658
  }
65820
- getDescription() {
65821
- // todo
65822
- return undefined;
65823
- }
65824
65659
  }
65825
65660
  exports.InboundService = InboundService;
65826
65661
  //# sourceMappingURL=inbound_service.js.map
@@ -66042,10 +65877,6 @@ class InfoArea extends _abstract_object_1.AbstractObject {
66042
65877
  allowNamespace: true,
66043
65878
  };
66044
65879
  }
66045
- getDescription() {
66046
- // todo
66047
- return undefined;
66048
- }
66049
65880
  }
66050
65881
  exports.InfoArea = InfoArea;
66051
65882
  //# sourceMappingURL=info_area.js.map
@@ -66073,10 +65904,6 @@ class InfoObject extends _abstract_object_1.AbstractObject {
66073
65904
  allowNamespace: true,
66074
65905
  };
66075
65906
  }
66076
- getDescription() {
66077
- // todo
66078
- return undefined;
66079
- }
66080
65907
  }
66081
65908
  exports.InfoObject = InfoObject;
66082
65909
  //# sourceMappingURL=info_object.js.map
@@ -66194,10 +66021,6 @@ class KnowledgeTransferDocument extends _abstract_object_1.AbstractObject {
66194
66021
  allowNamespace: true,
66195
66022
  };
66196
66023
  }
66197
- getDescription() {
66198
- // todo
66199
- return undefined;
66200
- }
66201
66024
  }
66202
66025
  exports.KnowledgeTransferDocument = KnowledgeTransferDocument;
66203
66026
  //# sourceMappingURL=knowledge_transfer_document.js.map
@@ -66328,10 +66151,6 @@ class MaintenanceAndTransportObject extends _abstract_object_1.AbstractObject {
66328
66151
  getType() {
66329
66152
  return "TOBJ";
66330
66153
  }
66331
- getDescription() {
66332
- // todo
66333
- return undefined;
66334
- }
66335
66154
  getAllowedNaming() {
66336
66155
  return {
66337
66156
  maxLength: 31,
@@ -66525,10 +66344,6 @@ class MessagingChannel extends _abstract_object_1.AbstractObject {
66525
66344
  allowNamespace: true,
66526
66345
  };
66527
66346
  }
66528
- getDescription() {
66529
- // todo
66530
- return undefined;
66531
- }
66532
66347
  }
66533
66348
  exports.MessagingChannel = MessagingChannel;
66534
66349
  //# sourceMappingURL=messaging_channel.js.map
@@ -66562,6 +66377,7 @@ class MIMEObject extends _abstract_object_1.AbstractObject {
66562
66377
  }
66563
66378
  isFolder() {
66564
66379
  var _a;
66380
+ this.parse();
66565
66381
  return ((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.FOLDER) === "X";
66566
66382
  }
66567
66383
  getAllowedNaming() {
@@ -66583,10 +66399,6 @@ class MIMEObject extends _abstract_object_1.AbstractObject {
66583
66399
  this.parsedXML = undefined;
66584
66400
  super.setDirty();
66585
66401
  }
66586
- getDescription() {
66587
- // this object type does not have a description
66588
- return undefined;
66589
- }
66590
66402
  parse() {
66591
66403
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
66592
66404
  if (this.parsedXML) {
@@ -66634,10 +66446,6 @@ class Namespace extends _abstract_object_1.AbstractObject {
66634
66446
  customRegex: new RegExp(/^\/[A-Z_\d]{3,8}\/$/i),
66635
66447
  };
66636
66448
  }
66637
- getDescription() {
66638
- // todo
66639
- return undefined;
66640
- }
66641
66449
  }
66642
66450
  exports.Namespace = Namespace;
66643
66451
  //# sourceMappingURL=namespace.js.map
@@ -66666,10 +66474,6 @@ class NeptuneAPI extends _abstract_object_1.AbstractObject {
66666
66474
  customRegex: /.*/i,
66667
66475
  };
66668
66476
  }
66669
- getDescription() {
66670
- // todo
66671
- return undefined;
66672
- }
66673
66477
  }
66674
66478
  exports.NeptuneAPI = NeptuneAPI;
66675
66479
  //# sourceMappingURL=neptune_api.js.map
@@ -66697,10 +66501,6 @@ class NeptuneApp extends _abstract_object_1.AbstractObject {
66697
66501
  allowNamespace: true,
66698
66502
  };
66699
66503
  }
66700
- getDescription() {
66701
- // todo
66702
- return undefined;
66703
- }
66704
66504
  }
66705
66505
  exports.NeptuneApp = NeptuneApp;
66706
66506
  //# sourceMappingURL=neptune_app.js.map
@@ -66728,10 +66528,6 @@ class NeptuneCustomColor extends _abstract_object_1.AbstractObject {
66728
66528
  allowNamespace: true,
66729
66529
  };
66730
66530
  }
66731
- getDescription() {
66732
- // todo
66733
- return undefined;
66734
- }
66735
66531
  }
66736
66532
  exports.NeptuneCustomColor = NeptuneCustomColor;
66737
66533
  //# sourceMappingURL=neptune_custom_color.js.map
@@ -66759,10 +66555,6 @@ class NeptuneCustomJSHelper extends _abstract_object_1.AbstractObject {
66759
66555
  allowNamespace: true,
66760
66556
  };
66761
66557
  }
66762
- getDescription() {
66763
- // todo
66764
- return undefined;
66765
- }
66766
66558
  }
66767
66559
  exports.NeptuneCustomJSHelper = NeptuneCustomJSHelper;
66768
66560
  //# sourceMappingURL=neptune_custom_js_helper.js.map
@@ -66790,10 +66582,6 @@ class NeptuneDocumentation extends _abstract_object_1.AbstractObject {
66790
66582
  allowNamespace: true,
66791
66583
  };
66792
66584
  }
66793
- getDescription() {
66794
- // todo
66795
- return undefined;
66796
- }
66797
66585
  }
66798
66586
  exports.NeptuneDocumentation = NeptuneDocumentation;
66799
66587
  //# sourceMappingURL=neptune_documentation.js.map
@@ -66821,10 +66609,6 @@ class NeptuneEnhancement extends _abstract_object_1.AbstractObject {
66821
66609
  allowNamespace: true,
66822
66610
  };
66823
66611
  }
66824
- getDescription() {
66825
- // todo
66826
- return undefined;
66827
- }
66828
66612
  }
66829
66613
  exports.NeptuneEnhancement = NeptuneEnhancement;
66830
66614
  //# sourceMappingURL=neptune_enhancement.js.map
@@ -66852,10 +66636,6 @@ class NeptuneLaunchpad extends _abstract_object_1.AbstractObject {
66852
66636
  allowNamespace: true,
66853
66637
  };
66854
66638
  }
66855
- getDescription() {
66856
- // todo
66857
- return undefined;
66858
- }
66859
66639
  }
66860
66640
  exports.NeptuneLaunchpad = NeptuneLaunchpad;
66861
66641
  //# sourceMappingURL=neptune_launchpad.js.map
@@ -66883,10 +66663,6 @@ class NeptuneLaunchpadLayout extends _abstract_object_1.AbstractObject {
66883
66663
  allowNamespace: true,
66884
66664
  };
66885
66665
  }
66886
- getDescription() {
66887
- // todo
66888
- return undefined;
66889
- }
66890
66666
  }
66891
66667
  exports.NeptuneLaunchpadLayout = NeptuneLaunchpadLayout;
66892
66668
  //# sourceMappingURL=neptune_launchpad_layout.js.map
@@ -66914,10 +66690,6 @@ class NeptuneLoginPage extends _abstract_object_1.AbstractObject {
66914
66690
  allowNamespace: true,
66915
66691
  };
66916
66692
  }
66917
- getDescription() {
66918
- // todo
66919
- return undefined;
66920
- }
66921
66693
  }
66922
66694
  exports.NeptuneLoginPage = NeptuneLoginPage;
66923
66695
  //# sourceMappingURL=neptune_login_page.js.map
@@ -66945,10 +66717,6 @@ class NeptuneMediaLibrary extends _abstract_object_1.AbstractObject {
66945
66717
  allowNamespace: true,
66946
66718
  };
66947
66719
  }
66948
- getDescription() {
66949
- // todo
66950
- return undefined;
66951
- }
66952
66720
  }
66953
66721
  exports.NeptuneMediaLibrary = NeptuneMediaLibrary;
66954
66722
  //# sourceMappingURL=neptune_media_library.js.map
@@ -66976,10 +66744,6 @@ class NeptuneMediaPack extends _abstract_object_1.AbstractObject {
66976
66744
  allowNamespace: true,
66977
66745
  };
66978
66746
  }
66979
- getDescription() {
66980
- // todo
66981
- return undefined;
66982
- }
66983
66747
  }
66984
66748
  exports.NeptuneMediaPack = NeptuneMediaPack;
66985
66749
  //# sourceMappingURL=neptune_media_pack.js.map
@@ -67007,10 +66771,6 @@ class NeptuneMetadata extends _abstract_object_1.AbstractObject {
67007
66771
  allowNamespace: true,
67008
66772
  };
67009
66773
  }
67010
- getDescription() {
67011
- // todo
67012
- return undefined;
67013
- }
67014
66774
  }
67015
66775
  exports.NeptuneMetadata = NeptuneMetadata;
67016
66776
  //# sourceMappingURL=neptune_metadata.js.map
@@ -67038,10 +66798,6 @@ class NeptuneMobileClient extends _abstract_object_1.AbstractObject {
67038
66798
  allowNamespace: true,
67039
66799
  };
67040
66800
  }
67041
- getDescription() {
67042
- // todo
67043
- return undefined;
67044
- }
67045
66801
  }
67046
66802
  exports.NeptuneMobileClient = NeptuneMobileClient;
67047
66803
  //# sourceMappingURL=neptune_mobile_client.js.map
@@ -67069,10 +66825,6 @@ class NeptuneOData extends _abstract_object_1.AbstractObject {
67069
66825
  allowNamespace: true,
67070
66826
  };
67071
66827
  }
67072
- getDescription() {
67073
- // todo
67074
- return undefined;
67075
- }
67076
66828
  }
67077
66829
  exports.NeptuneOData = NeptuneOData;
67078
66830
  //# sourceMappingURL=neptune_odata.js.map
@@ -67100,10 +66852,6 @@ class NeptunePolicy extends _abstract_object_1.AbstractObject {
67100
66852
  allowNamespace: true,
67101
66853
  };
67102
66854
  }
67103
- getDescription() {
67104
- // todo
67105
- return undefined;
67106
- }
67107
66855
  }
67108
66856
  exports.NeptunePolicy = NeptunePolicy;
67109
66857
  //# sourceMappingURL=neptune_policy.js.map
@@ -67131,10 +66879,6 @@ class NeptuneRFCMapping extends _abstract_object_1.AbstractObject {
67131
66879
  allowNamespace: true,
67132
66880
  };
67133
66881
  }
67134
- getDescription() {
67135
- // todo
67136
- return undefined;
67137
- }
67138
66882
  }
67139
66883
  exports.NeptuneRFCMapping = NeptuneRFCMapping;
67140
66884
  //# sourceMappingURL=neptune_rfc_mapping.js.map
@@ -67162,10 +66906,6 @@ class NeptuneRichTextTemplate extends _abstract_object_1.AbstractObject {
67162
66906
  allowNamespace: true,
67163
66907
  };
67164
66908
  }
67165
- getDescription() {
67166
- // todo
67167
- return undefined;
67168
- }
67169
66909
  }
67170
66910
  exports.NeptuneRichTextTemplate = NeptuneRichTextTemplate;
67171
66911
  //# sourceMappingURL=neptune_rich_text_template.js.map
@@ -67193,10 +66933,6 @@ class NeptuneSplashScreen extends _abstract_object_1.AbstractObject {
67193
66933
  allowNamespace: true,
67194
66934
  };
67195
66935
  }
67196
- getDescription() {
67197
- // todo
67198
- return undefined;
67199
- }
67200
66936
  }
67201
66937
  exports.NeptuneSplashScreen = NeptuneSplashScreen;
67202
66938
  //# sourceMappingURL=neptune_splash_screen.js.map
@@ -67224,10 +66960,6 @@ class NeptuneStickyBanner extends _abstract_object_1.AbstractObject {
67224
66960
  allowNamespace: true,
67225
66961
  };
67226
66962
  }
67227
- getDescription() {
67228
- // todo
67229
- return undefined;
67230
- }
67231
66963
  }
67232
66964
  exports.NeptuneStickyBanner = NeptuneStickyBanner;
67233
66965
  //# sourceMappingURL=neptune_sticky_banner.js.map
@@ -67255,10 +66987,6 @@ class NeptuneTile extends _abstract_object_1.AbstractObject {
67255
66987
  allowNamespace: true,
67256
66988
  };
67257
66989
  }
67258
- getDescription() {
67259
- // todo
67260
- return undefined;
67261
- }
67262
66990
  }
67263
66991
  exports.NeptuneTile = NeptuneTile;
67264
66992
  //# sourceMappingURL=neptune_tile.js.map
@@ -67286,10 +67014,6 @@ class NeptuneTileGroup extends _abstract_object_1.AbstractObject {
67286
67014
  allowNamespace: true,
67287
67015
  };
67288
67016
  }
67289
- getDescription() {
67290
- // todo
67291
- return undefined;
67292
- }
67293
67017
  }
67294
67018
  exports.NeptuneTileGroup = NeptuneTileGroup;
67295
67019
  //# sourceMappingURL=neptune_tile_group.js.map
@@ -67317,10 +67041,6 @@ class NeptuneTileLayout extends _abstract_object_1.AbstractObject {
67317
67041
  allowNamespace: true,
67318
67042
  };
67319
67043
  }
67320
- getDescription() {
67321
- // todo
67322
- return undefined;
67323
- }
67324
67044
  }
67325
67045
  exports.NeptuneTileLayout = NeptuneTileLayout;
67326
67046
  //# sourceMappingURL=neptune_tile_layout.js.map
@@ -67348,10 +67068,6 @@ class NeptuneURLAlias extends _abstract_object_1.AbstractObject {
67348
67068
  allowNamespace: true,
67349
67069
  };
67350
67070
  }
67351
- getDescription() {
67352
- // todo
67353
- return undefined;
67354
- }
67355
67071
  }
67356
67072
  exports.NeptuneURLAlias = NeptuneURLAlias;
67357
67073
  //# sourceMappingURL=neptune_url_alias.js.map
@@ -67445,10 +67161,6 @@ class Oauth2Profile extends _abstract_object_1.AbstractObject {
67445
67161
  allowNamespace: true,
67446
67162
  };
67447
67163
  }
67448
- getDescription() {
67449
- // todo
67450
- return undefined;
67451
- }
67452
67164
  listScopes() {
67453
67165
  var _a, _b, _c, _d, _e;
67454
67166
  const ret = [];
@@ -67485,10 +67197,6 @@ class ObjectCharacteristic extends _abstract_object_1.AbstractObject {
67485
67197
  allowNamespace: true,
67486
67198
  };
67487
67199
  }
67488
- getDescription() {
67489
- // todo
67490
- return undefined;
67491
- }
67492
67200
  }
67493
67201
  exports.ObjectCharacteristic = ObjectCharacteristic;
67494
67202
  //# sourceMappingURL=object_characteristic.js.map
@@ -67516,10 +67224,6 @@ class OutboundService extends _abstract_object_1.AbstractObject {
67516
67224
  allowNamespace: true,
67517
67225
  };
67518
67226
  }
67519
- getDescription() {
67520
- // todo
67521
- return undefined;
67522
- }
67523
67227
  }
67524
67228
  exports.OutboundService = OutboundService;
67525
67229
  //# sourceMappingURL=outbound_service.js.map
@@ -67547,10 +67251,6 @@ class Package extends _abstract_object_1.AbstractObject {
67547
67251
  allowNamespace: true,
67548
67252
  };
67549
67253
  }
67550
- getDescription() {
67551
- // todo
67552
- return undefined;
67553
- }
67554
67254
  }
67555
67255
  exports.Package = Package;
67556
67256
  //# sourceMappingURL=package.js.map
@@ -67578,10 +67278,6 @@ class PackageInterface extends _abstract_object_1.AbstractObject {
67578
67278
  allowNamespace: true,
67579
67279
  };
67580
67280
  }
67581
- getDescription() {
67582
- // todo
67583
- return undefined;
67584
- }
67585
67281
  }
67586
67282
  exports.PackageInterface = PackageInterface;
67587
67283
  //# sourceMappingURL=package_interface.js.map
@@ -67609,10 +67305,6 @@ class PageFormat extends _abstract_object_1.AbstractObject {
67609
67305
  allowNamespace: true,
67610
67306
  };
67611
67307
  }
67612
- getDescription() {
67613
- // todo
67614
- return undefined;
67615
- }
67616
67308
  }
67617
67309
  exports.PageFormat = PageFormat;
67618
67310
  //# sourceMappingURL=page_format.js.map
@@ -67640,10 +67332,6 @@ class Parameter extends _abstract_object_1.AbstractObject {
67640
67332
  allowNamespace: true,
67641
67333
  };
67642
67334
  }
67643
- getDescription() {
67644
- // todo
67645
- return undefined;
67646
- }
67647
67335
  }
67648
67336
  exports.Parameter = Parameter;
67649
67337
  //# sourceMappingURL=parameter.js.map
@@ -67671,10 +67359,6 @@ class PersonalizationObject extends _abstract_object_1.AbstractObject {
67671
67359
  allowNamespace: true,
67672
67360
  };
67673
67361
  }
67674
- getDescription() {
67675
- // todo
67676
- return undefined;
67677
- }
67678
67362
  }
67679
67363
  exports.PersonalizationObject = PersonalizationObject;
67680
67364
  //# sourceMappingURL=personalization_object.js.map
@@ -67919,10 +67603,6 @@ class PushChannel extends _abstract_object_1.AbstractObject {
67919
67603
  allowNamespace: true,
67920
67604
  };
67921
67605
  }
67922
- getDescription() {
67923
- // todo
67924
- return undefined;
67925
- }
67926
67606
  }
67927
67607
  exports.PushChannel = PushChannel;
67928
67608
  //# sourceMappingURL=push_channel.js.map
@@ -67950,10 +67630,6 @@ class QueryUserGroup extends _abstract_object_1.AbstractObject {
67950
67630
  allowNamespace: true,
67951
67631
  };
67952
67632
  }
67953
- getDescription() {
67954
- // todo
67955
- return undefined;
67956
- }
67957
67633
  }
67958
67634
  exports.QueryUserGroup = QueryUserGroup;
67959
67635
  //# sourceMappingURL=query_user_group.js.map
@@ -68920,10 +68596,6 @@ class RestrictionField extends _abstract_object_1.AbstractObject {
68920
68596
  allowNamespace: true,
68921
68597
  };
68922
68598
  }
68923
- getDescription() {
68924
- // todo
68925
- return undefined;
68926
- }
68927
68599
  }
68928
68600
  exports.RestrictionField = RestrictionField;
68929
68601
  //# sourceMappingURL=restriction_field.js.map
@@ -68951,10 +68623,6 @@ class RestrictionType extends _abstract_object_1.AbstractObject {
68951
68623
  allowNamespace: true,
68952
68624
  };
68953
68625
  }
68954
- getDescription() {
68955
- // todo
68956
- return undefined;
68957
- }
68958
68626
  }
68959
68627
  exports.RestrictionType = RestrictionType;
68960
68628
  //# sourceMappingURL=restriction_type.js.map
@@ -68982,10 +68650,6 @@ class RFCService extends _abstract_object_1.AbstractObject {
68982
68650
  allowNamespace: true,
68983
68651
  };
68984
68652
  }
68985
- getDescription() {
68986
- // todo
68987
- return undefined;
68988
- }
68989
68653
  }
68990
68654
  exports.RFCService = RFCService;
68991
68655
  //# sourceMappingURL=rfc_service.js.map
@@ -69013,10 +68677,6 @@ class SAPScript extends _abstract_object_1.AbstractObject {
69013
68677
  allowNamespace: true,
69014
68678
  };
69015
68679
  }
69016
- getDescription() {
69017
- // todo
69018
- return undefined;
69019
- }
69020
68680
  }
69021
68681
  exports.SAPScript = SAPScript;
69022
68682
  //# sourceMappingURL=sapscript.js.map
@@ -69044,10 +68704,6 @@ class SAPScriptStyle extends _abstract_object_1.AbstractObject {
69044
68704
  allowNamespace: true,
69045
68705
  };
69046
68706
  }
69047
- getDescription() {
69048
- // todo
69049
- return undefined;
69050
- }
69051
68707
  }
69052
68708
  exports.SAPScriptStyle = SAPScriptStyle;
69053
68709
  //# sourceMappingURL=sapscript_style.js.map
@@ -69075,10 +68731,6 @@ class ScreenVariant extends _abstract_object_1.AbstractObject {
69075
68731
  allowNamespace: true,
69076
68732
  };
69077
68733
  }
69078
- getDescription() {
69079
- // todo
69080
- return undefined;
69081
- }
69082
68734
  }
69083
68735
  exports.ScreenVariant = ScreenVariant;
69084
68736
  //# sourceMappingURL=screen_variant.js.map
@@ -69106,10 +68758,6 @@ class SearchHelp extends _abstract_object_1.AbstractObject {
69106
68758
  allowNamespace: true,
69107
68759
  };
69108
68760
  }
69109
- getDescription() {
69110
- // todo
69111
- return undefined;
69112
- }
69113
68761
  }
69114
68762
  exports.SearchHelp = SearchHelp;
69115
68763
  //# sourceMappingURL=search_help.js.map
@@ -69137,10 +68785,6 @@ class ServiceBinding extends _abstract_object_1.AbstractObject {
69137
68785
  allowNamespace: true,
69138
68786
  };
69139
68787
  }
69140
- getDescription() {
69141
- // todo
69142
- return undefined;
69143
- }
69144
68788
  }
69145
68789
  exports.ServiceBinding = ServiceBinding;
69146
68790
  //# sourceMappingURL=service_binding.js.map
@@ -69168,10 +68812,6 @@ class ServiceDefinition extends _abstract_object_1.AbstractObject {
69168
68812
  allowNamespace: true,
69169
68813
  };
69170
68814
  }
69171
- getDescription() {
69172
- // todo
69173
- return undefined;
69174
- }
69175
68815
  }
69176
68816
  exports.ServiceDefinition = ServiceDefinition;
69177
68817
  //# sourceMappingURL=service_definition.js.map
@@ -69199,10 +68839,6 @@ class SharedMemory extends _abstract_object_1.AbstractObject {
69199
68839
  allowNamespace: true,
69200
68840
  };
69201
68841
  }
69202
- getDescription() {
69203
- // todo
69204
- return undefined;
69205
- }
69206
68842
  }
69207
68843
  exports.SharedMemory = SharedMemory;
69208
68844
  //# sourceMappingURL=shared_memory.js.map
@@ -69230,10 +68866,6 @@ class SmartForm extends _abstract_object_1.AbstractObject {
69230
68866
  allowNamespace: true,
69231
68867
  };
69232
68868
  }
69233
- getDescription() {
69234
- // todo
69235
- return undefined;
69236
- }
69237
68869
  }
69238
68870
  exports.SmartForm = SmartForm;
69239
68871
  //# sourceMappingURL=smart_form.js.map
@@ -69261,10 +68893,6 @@ class SmartStyle extends _abstract_object_1.AbstractObject {
69261
68893
  allowNamespace: true,
69262
68894
  };
69263
68895
  }
69264
- getDescription() {
69265
- // todo
69266
- return undefined;
69267
- }
69268
68896
  }
69269
68897
  exports.SmartStyle = SmartStyle;
69270
68898
  //# sourceMappingURL=smart_style.js.map
@@ -69292,10 +68920,6 @@ class StandardTask extends _abstract_object_1.AbstractObject {
69292
68920
  allowNamespace: true,
69293
68921
  };
69294
68922
  }
69295
- getDescription() {
69296
- // todo
69297
- return undefined;
69298
- }
69299
68923
  }
69300
68924
  exports.StandardTask = StandardTask;
69301
68925
  //# sourceMappingURL=standard_task.js.map
@@ -69323,10 +68947,6 @@ class SwitchAssignmentHierarchy extends _abstract_object_1.AbstractObject {
69323
68947
  allowNamespace: true,
69324
68948
  };
69325
68949
  }
69326
- getDescription() {
69327
- // todo
69328
- return undefined;
69329
- }
69330
68950
  }
69331
68951
  exports.SwitchAssignmentHierarchy = SwitchAssignmentHierarchy;
69332
68952
  //# sourceMappingURL=switch_assignment_hierarchy.js.map
@@ -69354,10 +68974,6 @@ class SwitchAssignments extends _abstract_object_1.AbstractObject {
69354
68974
  allowNamespace: true,
69355
68975
  };
69356
68976
  }
69357
- getDescription() {
69358
- // todo
69359
- return undefined;
69360
- }
69361
68977
  }
69362
68978
  exports.SwitchAssignments = SwitchAssignments;
69363
68979
  //# sourceMappingURL=switch_assignments.js.map
@@ -69486,11 +69102,17 @@ class Table extends _abstract_object_1.AbstractObject {
69486
69102
  }
69487
69103
  const ret = [];
69488
69104
  for (const p of this.parsedData.fields) {
69489
- if (p.KEYFLAG === "X" && p.FIELDNAME === ".INCLUDE") {
69490
- const lookup = new ddic_1.DDIC(reg).lookupTableOrView(p.PRECFIELD).type;
69105
+ if (p.KEYFLAG === "X" && (p.FIELDNAME === ".INCLUDE" || p.FIELDNAME.startsWith(".INCLU-"))) {
69106
+ let lookup = new ddic_1.DDIC(reg).lookupTableOrView(p.PRECFIELD).type;
69107
+ if (lookup instanceof _typed_identifier_1.TypedIdentifier) {
69108
+ lookup = lookup.getType();
69109
+ }
69110
+ // same naming as in parseType(), "--AP" are .APPENDS and get no suffix
69111
+ const postfix = p.FIELDNAME.startsWith(".INCLU-") && p.FIELDNAME !== ".INCLU--AP"
69112
+ ? p.FIELDNAME.substring(".INCLU-".length) : "";
69491
69113
  if (lookup instanceof Types.StructureType) {
69492
69114
  for (const c of lookup.getComponents()) {
69493
- ret.push(c.name);
69115
+ ret.push(c.name + postfix);
69494
69116
  }
69495
69117
  }
69496
69118
  }
@@ -70071,10 +69693,6 @@ class TechnicalJobDefinition extends _abstract_object_1.AbstractObject {
70071
69693
  allowNamespace: true,
70072
69694
  };
70073
69695
  }
70074
- getDescription() {
70075
- // todo
70076
- return undefined;
70077
- }
70078
69696
  }
70079
69697
  exports.TechnicalJobDefinition = TechnicalJobDefinition;
70080
69698
  //# sourceMappingURL=technical_job_definition.js.map
@@ -70176,10 +69794,6 @@ class TransactionVariant extends _abstract_object_1.AbstractObject {
70176
69794
  allowNamespace: true,
70177
69795
  };
70178
69796
  }
70179
- getDescription() {
70180
- // todo
70181
- return undefined;
70182
- }
70183
69797
  }
70184
69798
  exports.TransactionVariant = TransactionVariant;
70185
69799
  //# sourceMappingURL=transaction_variant.js.map
@@ -70207,10 +69821,6 @@ class Transformation extends _abstract_object_1.AbstractObject {
70207
69821
  allowNamespace: true,
70208
69822
  };
70209
69823
  }
70210
- getDescription() {
70211
- // todo
70212
- return undefined;
70213
- }
70214
69824
  }
70215
69825
  exports.Transformation = Transformation;
70216
69826
  //# sourceMappingURL=transformation.js.map
@@ -70481,10 +70091,6 @@ class ViewCluster extends _abstract_object_1.AbstractObject {
70481
70091
  allowNamespace: true,
70482
70092
  };
70483
70093
  }
70484
- getDescription() {
70485
- // todo
70486
- return undefined;
70487
- }
70488
70094
  }
70489
70095
  exports.ViewCluster = ViewCluster;
70490
70096
  //# sourceMappingURL=view_cluster.js.map
@@ -70512,10 +70118,6 @@ class VirtualEndPoint extends _abstract_object_1.AbstractObject {
70512
70118
  allowNamespace: true,
70513
70119
  };
70514
70120
  }
70515
- getDescription() {
70516
- // todo
70517
- return undefined;
70518
- }
70519
70121
  }
70520
70122
  exports.VirtualEndPoint = VirtualEndPoint;
70521
70123
  //# sourceMappingURL=virtual_end_point.js.map
@@ -70543,10 +70145,6 @@ class WebDynproApplication extends _abstract_object_1.AbstractObject {
70543
70145
  allowNamespace: true,
70544
70146
  };
70545
70147
  }
70546
- getDescription() {
70547
- // todo
70548
- return undefined;
70549
- }
70550
70148
  }
70551
70149
  exports.WebDynproApplication = WebDynproApplication;
70552
70150
  //# sourceMappingURL=web_dynpro_application.js.map
@@ -70574,10 +70172,6 @@ class WebDynproApplicationConfiguration extends _abstract_object_1.AbstractObjec
70574
70172
  allowNamespace: true,
70575
70173
  };
70576
70174
  }
70577
- getDescription() {
70578
- // todo
70579
- return undefined;
70580
- }
70581
70175
  }
70582
70176
  exports.WebDynproApplicationConfiguration = WebDynproApplicationConfiguration;
70583
70177
  //# sourceMappingURL=web_dynpro_application_configuration.js.map
@@ -70605,10 +70199,6 @@ class WebDynproComponent extends _abstract_object_1.AbstractObject {
70605
70199
  allowNamespace: true,
70606
70200
  };
70607
70201
  }
70608
- getDescription() {
70609
- // todo
70610
- return undefined;
70611
- }
70612
70202
  }
70613
70203
  exports.WebDynproComponent = WebDynproComponent;
70614
70204
  //# sourceMappingURL=web_dynpro_component.js.map
@@ -70636,10 +70226,6 @@ class WebDynproComponentConfiguration extends _abstract_object_1.AbstractObject
70636
70226
  allowNamespace: true,
70637
70227
  };
70638
70228
  }
70639
- getDescription() {
70640
- // todo
70641
- return undefined;
70642
- }
70643
70229
  }
70644
70230
  exports.WebDynproComponentConfiguration = WebDynproComponentConfiguration;
70645
70231
  //# sourceMappingURL=web_dynpro_component_configuration.js.map
@@ -70747,10 +70333,6 @@ class WebReportingTemplate extends _abstract_object_1.AbstractObject {
70747
70333
  allowNamespace: true,
70748
70334
  };
70749
70335
  }
70750
- getDescription() {
70751
- // todo
70752
- return undefined;
70753
- }
70754
70336
  }
70755
70337
  exports.WebReportingTemplate = WebReportingTemplate;
70756
70338
  //# sourceMappingURL=web_reporting_template.js.map
@@ -71315,7 +70897,7 @@ class Registry {
71315
70897
  }
71316
70898
  static abaplintVersion() {
71317
70899
  // magic, see build script "version.js"
71318
- return "2.120.63";
70900
+ return "2.120.65";
71319
70901
  }
71320
70902
  getDDICReferences() {
71321
70903
  return this.ddicReferences;
@@ -81811,6 +81393,178 @@ exports.EasyToFindMessages = EasyToFindMessages;
81811
81393
 
81812
81394
  /***/ },
81813
81395
 
81396
+ /***/ "./node_modules/@abaplint/core/build/src/rules/else_after_all_returns.js"
81397
+ /*!*******************************************************************************!*\
81398
+ !*** ./node_modules/@abaplint/core/build/src/rules/else_after_all_returns.js ***!
81399
+ \*******************************************************************************/
81400
+ (__unused_webpack_module, exports, __webpack_require__) {
81401
+
81402
+ "use strict";
81403
+
81404
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
81405
+ if (k2 === undefined) k2 = k;
81406
+ var desc = Object.getOwnPropertyDescriptor(m, k);
81407
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
81408
+ desc = { enumerable: true, get: function() { return m[k]; } };
81409
+ }
81410
+ Object.defineProperty(o, k2, desc);
81411
+ }) : (function(o, m, k, k2) {
81412
+ if (k2 === undefined) k2 = k;
81413
+ o[k2] = m[k];
81414
+ }));
81415
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
81416
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
81417
+ }) : function(o, v) {
81418
+ o["default"] = v;
81419
+ });
81420
+ var __importStar = (this && this.__importStar) || (function () {
81421
+ var ownKeys = function(o) {
81422
+ ownKeys = Object.getOwnPropertyNames || function (o) {
81423
+ var ar = [];
81424
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
81425
+ return ar;
81426
+ };
81427
+ return ownKeys(o);
81428
+ };
81429
+ return function (mod) {
81430
+ if (mod && mod.__esModule) return mod;
81431
+ var result = {};
81432
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
81433
+ __setModuleDefault(result, mod);
81434
+ return result;
81435
+ };
81436
+ })();
81437
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
81438
+ exports.ElseAfterAllReturns = exports.ElseAfterAllReturnsConf = void 0;
81439
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
81440
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
81441
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
81442
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
81443
+ const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
81444
+ const Structures = __importStar(__webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js"));
81445
+ const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
81446
+ const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
81447
+ const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
81448
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
81449
+ class ElseAfterAllReturnsConf extends _basic_rule_config_1.BasicRuleConfig {
81450
+ }
81451
+ exports.ElseAfterAllReturnsConf = ElseAfterAllReturnsConf;
81452
+ class ElseAfterAllReturns extends _abap_rule_1.ABAPRule {
81453
+ constructor() {
81454
+ super(...arguments);
81455
+ this.conf = new ElseAfterAllReturnsConf();
81456
+ }
81457
+ getMetadata() {
81458
+ return {
81459
+ key: "else_after_all_returns",
81460
+ title: "Else after all returns",
81461
+ shortDescription: `Finds ELSE branches that are redundant because all prior branches exit unconditionally.`,
81462
+ extendedInformation: `When every branch preceding ELSE ends with RETURN, EXIT, or CONTINUE (or a non-resumable RAISE / LEAVE), ` +
81463
+ `the ELSE keyword adds no logical value and can be removed by de-indenting its body.`,
81464
+ tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],
81465
+ badExample: `IF x = 1.\n RETURN.\nELSE.\n WRITE 'hello'.\nENDIF.`,
81466
+ goodExample: `IF x = 1.\n RETURN.\nENDIF.\nWRITE 'hello'.`,
81467
+ };
81468
+ }
81469
+ getConfig() {
81470
+ return this.conf;
81471
+ }
81472
+ setConfig(conf) {
81473
+ this.conf = conf;
81474
+ }
81475
+ runParsed(file, _obj) {
81476
+ const issues = [];
81477
+ const structure = file.getStructure();
81478
+ if (structure === undefined) {
81479
+ return [];
81480
+ }
81481
+ for (const ifNode of structure.findAllStructures(Structures.If)) {
81482
+ const elseNode = ifNode.findDirectStructure(Structures.Else);
81483
+ if (elseNode === undefined) {
81484
+ continue;
81485
+ }
81486
+ if (this.allBranchesExit(ifNode)) {
81487
+ const elseStatement = elseNode.findFirstStatement(Statements.Else);
81488
+ const endifStatement = ifNode.findDirectStatement(Statements.EndIf);
81489
+ if (elseStatement === undefined || endifStatement === undefined) {
81490
+ continue;
81491
+ }
81492
+ const fix = edit_helper_1.EditHelper.merge(edit_helper_1.EditHelper.replaceRange(file, elseStatement.getFirstToken().getStart(), elseStatement.getLastToken().getEnd(), "ENDIF."), edit_helper_1.EditHelper.deleteStatement(file, endifStatement));
81493
+ const message = "Redundant ELSE: all prior branches exit unconditionally";
81494
+ issues.push(issue_1.Issue.atStatement(file, elseStatement, message, this.getMetadata().key, this.conf.severity, fix));
81495
+ }
81496
+ }
81497
+ return issues;
81498
+ }
81499
+ // Returns true if every branch before the ELSE ends with an unconditional exit.
81500
+ allBranchesExit(ifNode) {
81501
+ // Main IF body
81502
+ const mainBody = ifNode.findDirectStructure(Structures.Body);
81503
+ if (!this.bodyEndsWithExit(mainBody)) {
81504
+ return false;
81505
+ }
81506
+ // Each ELSEIF body
81507
+ for (const elseifNode of ifNode.findDirectStructures(Structures.ElseIf)) {
81508
+ const elseifBody = elseifNode.findDirectStructure(Structures.Body);
81509
+ if (!this.bodyEndsWithExit(elseifBody)) {
81510
+ return false;
81511
+ }
81512
+ }
81513
+ return true;
81514
+ }
81515
+ bodyEndsWithExit(body) {
81516
+ if (body === undefined) {
81517
+ return false;
81518
+ }
81519
+ const last = this.lastNonCommentStatement(body);
81520
+ if (last === undefined) {
81521
+ return false;
81522
+ }
81523
+ return this.isExit(last);
81524
+ }
81525
+ collectStatements(node) {
81526
+ const result = [];
81527
+ for (const child of node.getChildren()) {
81528
+ if (child instanceof nodes_1.StatementNode) {
81529
+ result.push(child);
81530
+ }
81531
+ else if (child instanceof nodes_1.StructureNode) {
81532
+ result.push(...this.collectStatements(child));
81533
+ }
81534
+ }
81535
+ return result;
81536
+ }
81537
+ lastNonCommentStatement(node) {
81538
+ const all = this.collectStatements(node);
81539
+ for (let i = all.length - 1; i >= 0; i--) {
81540
+ if (!(all[i].get() instanceof _statement_1.Comment)) {
81541
+ return all[i];
81542
+ }
81543
+ }
81544
+ return undefined;
81545
+ }
81546
+ isExit(node) {
81547
+ const s = node.get();
81548
+ if (s instanceof Statements.Return
81549
+ || s instanceof Statements.Exit
81550
+ || s instanceof Statements.Continue) {
81551
+ return true;
81552
+ }
81553
+ if (s instanceof Statements.Raise) {
81554
+ return !node.concatTokens().toUpperCase().includes("RESUMABLE");
81555
+ }
81556
+ if (s instanceof Statements.Leave) {
81557
+ const tokens = node.concatTokens().toUpperCase();
81558
+ return !tokens.includes("LIST-PROCESSING") && node.findFirstExpression(Expressions.AndReturn) === undefined;
81559
+ }
81560
+ return false;
81561
+ }
81562
+ }
81563
+ exports.ElseAfterAllReturns = ElseAfterAllReturns;
81564
+ //# sourceMappingURL=else_after_all_returns.js.map
81565
+
81566
+ /***/ },
81567
+
81814
81568
  /***/ "./node_modules/@abaplint/core/build/src/rules/empty_event.js"
81815
81569
  /*!********************************************************************!*\
81816
81570
  !*** ./node_modules/@abaplint/core/build/src/rules/empty_event.js ***!
@@ -84773,6 +84527,8 @@ const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/sta
84773
84527
  const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
84774
84528
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
84775
84529
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
84530
+ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
84531
+ const _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
84776
84532
  // todo: abstract methods from superclass parents(might be multiple), if class is not abstract
84777
84533
  class ImplementMethodsConf extends _basic_rule_config_1.BasicRuleConfig {
84778
84534
  }
@@ -84883,7 +84639,7 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
84883
84639
  return undefined;
84884
84640
  }
84885
84641
  findInterface(identifier, name) {
84886
- const idef = this.findInterfaceByName(name);
84642
+ const idef = this.findInterfaceByName(name, identifier);
84887
84643
  if (idef === undefined) {
84888
84644
  const message = "Implemented interface \"" + name + "\" not found";
84889
84645
  const issue = issue_1.Issue.atIdentifier(identifier, message, this.getMetadata().key, this.conf.severity);
@@ -84891,24 +84647,45 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
84891
84647
  }
84892
84648
  return idef;
84893
84649
  }
84894
- findInterfaceByName(name) {
84650
+ findInterfaceByName(name, usedAt) {
84895
84651
  var _a;
84896
- let idef = undefined;
84897
84652
  const intf = this.reg.getObject("INTF", name);
84898
- if (intf === undefined) {
84899
- // lookup in localfiles
84653
+ const global = (_a = intf === null || intf === void 0 ? void 0 : intf.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getInfo().listInterfaceDefinitions()[0];
84654
+ let local = undefined;
84655
+ for (const file of this.obj.getABAPFiles()) {
84656
+ local = file.getInfo().getInterfaceDefinitionByName(name);
84657
+ if (local) {
84658
+ break;
84659
+ }
84660
+ }
84661
+ if (local === undefined || global === undefined) {
84662
+ return global || local;
84663
+ }
84664
+ // both a local and a global interface exist with the same name, use what the syntax check resolved
84665
+ const resolved = this.findResolvedInterface(name, usedAt);
84666
+ if (resolved !== undefined) {
84900
84667
  for (const file of this.obj.getABAPFiles()) {
84901
- const found = file.getInfo().getInterfaceDefinitionByName(name);
84902
- if (found) {
84903
- idef = found;
84904
- break;
84668
+ for (const idef of file.getInfo().listInterfaceDefinitions()) {
84669
+ if (idef.identifier.equals(resolved)) {
84670
+ return idef;
84671
+ }
84905
84672
  }
84906
84673
  }
84907
84674
  }
84908
- else {
84909
- idef = (_a = intf.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getInfo().listInterfaceDefinitions()[0];
84675
+ return global;
84676
+ }
84677
+ findResolvedInterface(name, usedAt) {
84678
+ var _a, _b, _c;
84679
+ const scope = new syntax_1.SyntaxLogic(this.reg, this.obj).run().spaghetti.lookupPosition(usedAt.getStart(), usedAt.getFilename());
84680
+ const upper = name.toUpperCase();
84681
+ for (const ref of (scope === null || scope === void 0 ? void 0 : scope.getData().references) || []) {
84682
+ if (ref.referenceType === _reference_1.ReferenceType.ObjectOrientedReference
84683
+ && ((_a = ref.extra) === null || _a === void 0 ? void 0 : _a.ooType) === "INTF"
84684
+ && ((_c = (_b = ref.extra) === null || _b === void 0 ? void 0 : _b.ooName) === null || _c === void 0 ? void 0 : _c.toUpperCase()) === upper) {
84685
+ return ref.resolved;
84686
+ }
84910
84687
  }
84911
- return idef;
84688
+ return undefined;
84912
84689
  }
84913
84690
  /** including implemented super interfaces */
84914
84691
  findInterfaceMethods(idef) {
@@ -85027,7 +84804,7 @@ class ImplementMethods extends _abap_rule_1.ABAPRule {
85027
84804
  }
85028
84805
  if (found === undefined) {
85029
84806
  for (const i of def.interfaces) {
85030
- const idef = this.findInterfaceByName(i.name);
84807
+ const idef = this.findInterfaceByName(i.name, def.identifier);
85031
84808
  if (idef === undefined) {
85032
84809
  continue;
85033
84810
  }
@@ -85632,6 +85409,7 @@ __exportStar(__webpack_require__(/*! ./empty_event */ "./node_modules/@abaplint/
85632
85409
  __exportStar(__webpack_require__(/*! ./empty_line_in_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js"), exports);
85633
85410
  __exportStar(__webpack_require__(/*! ./empty_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_statement.js"), exports);
85634
85411
  __exportStar(__webpack_require__(/*! ./empty_structure */ "./node_modules/@abaplint/core/build/src/rules/empty_structure.js"), exports);
85412
+ __exportStar(__webpack_require__(/*! ./else_after_all_returns */ "./node_modules/@abaplint/core/build/src/rules/else_after_all_returns.js"), exports);
85635
85413
  __exportStar(__webpack_require__(/*! ./exit_or_check */ "./node_modules/@abaplint/core/build/src/rules/exit_or_check.js"), exports);
85636
85414
  __exportStar(__webpack_require__(/*! ./expand_macros */ "./node_modules/@abaplint/core/build/src/rules/expand_macros.js"), exports);
85637
85415
  __exportStar(__webpack_require__(/*! ./exporting */ "./node_modules/@abaplint/core/build/src/rules/exporting.js"), exports);
@@ -85718,6 +85496,7 @@ __exportStar(__webpack_require__(/*! ./prefer_string_template */ "./node_modules
85718
85496
  __exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ "./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js"), exports);
85719
85497
  __exportStar(__webpack_require__(/*! ./prefer_xsdbool */ "./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js"), exports);
85720
85498
  __exportStar(__webpack_require__(/*! ./preferred_compare_operator */ "./node_modules/@abaplint/core/build/src/rules/preferred_compare_operator.js"), exports);
85499
+ __exportStar(__webpack_require__(/*! ./preferred_parameter_ignored */ "./node_modules/@abaplint/core/build/src/rules/preferred_parameter_ignored.js"), exports);
85721
85500
  __exportStar(__webpack_require__(/*! ./prefix_is_current_class */ "./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js"), exports);
85722
85501
  __exportStar(__webpack_require__(/*! ./reduce_procedural_code */ "./node_modules/@abaplint/core/build/src/rules/reduce_procedural_code.js"), exports);
85723
85502
  __exportStar(__webpack_require__(/*! ./reduce_string_templates */ "./node_modules/@abaplint/core/build/src/rules/reduce_string_templates.js"), exports);
@@ -94759,6 +94538,157 @@ exports.PreferredCompareOperator = PreferredCompareOperator;
94759
94538
 
94760
94539
  /***/ },
94761
94540
 
94541
+ /***/ "./node_modules/@abaplint/core/build/src/rules/preferred_parameter_ignored.js"
94542
+ /*!************************************************************************************!*\
94543
+ !*** ./node_modules/@abaplint/core/build/src/rules/preferred_parameter_ignored.js ***!
94544
+ \************************************************************************************/
94545
+ (__unused_webpack_module, exports, __webpack_require__) {
94546
+
94547
+ "use strict";
94548
+
94549
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
94550
+ if (k2 === undefined) k2 = k;
94551
+ var desc = Object.getOwnPropertyDescriptor(m, k);
94552
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
94553
+ desc = { enumerable: true, get: function() { return m[k]; } };
94554
+ }
94555
+ Object.defineProperty(o, k2, desc);
94556
+ }) : (function(o, m, k, k2) {
94557
+ if (k2 === undefined) k2 = k;
94558
+ o[k2] = m[k];
94559
+ }));
94560
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
94561
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
94562
+ }) : function(o, v) {
94563
+ o["default"] = v;
94564
+ });
94565
+ var __importStar = (this && this.__importStar) || (function () {
94566
+ var ownKeys = function(o) {
94567
+ ownKeys = Object.getOwnPropertyNames || function (o) {
94568
+ var ar = [];
94569
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
94570
+ return ar;
94571
+ };
94572
+ return ownKeys(o);
94573
+ };
94574
+ return function (mod) {
94575
+ if (mod && mod.__esModule) return mod;
94576
+ var result = {};
94577
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
94578
+ __setModuleDefault(result, mod);
94579
+ return result;
94580
+ };
94581
+ })();
94582
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
94583
+ exports.PreferredParameterIgnored = exports.PreferredParameterIgnoredConf = void 0;
94584
+ const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
94585
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
94586
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
94587
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
94588
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
94589
+ const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
94590
+ class PreferredParameterIgnoredConf extends _basic_rule_config_1.BasicRuleConfig {
94591
+ }
94592
+ exports.PreferredParameterIgnoredConf = PreferredParameterIgnoredConf;
94593
+ class PreferredParameterIgnored extends _abap_rule_1.ABAPRule {
94594
+ constructor() {
94595
+ super(...arguments);
94596
+ this.conf = new PreferredParameterIgnoredConf();
94597
+ }
94598
+ getMetadata() {
94599
+ return {
94600
+ key: "preferred_parameter_ignored",
94601
+ title: "PREFERRED PARAMETER is ignored",
94602
+ shortDescription: `PREFERRED PARAMETER on an IMPORTING clause that still has a mandatory
94603
+ parameter. The addition names the parameter a positional call fills, which only
94604
+ means something when every parameter may be left out - so with a mandatory one
94605
+ present it does nothing.`,
94606
+ extendedInformation: `\`PREFERRED PARAMETER\` names the importing parameter that a call filling exactly
94607
+ one parameter positionally fills. That question only arises when a parameter
94608
+ may be LEFT OUT, so the addition is ignored while any importing parameter is
94609
+ neither \`OPTIONAL\` nor carries a \`DEFAULT\`.
94610
+
94611
+ The compiler warns "Declare the parameter as OPTIONAL. The addition PREFERRED
94612
+ PARAMETER is ignored if non-optional parameters are used", yet it still lets a
94613
+ call leave the preferred parameter out. So the quick fix declares the mandatory
94614
+ importing parameters OPTIONAL, as the compiler asks: every call that compiles
94615
+ today keeps compiling. Removing the addition instead would turn the calls that
94616
+ leave the preferred parameter out into syntax errors.`,
94617
+ tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],
94618
+ badExample: `METHODS meth
94619
+ IMPORTING
94620
+ val TYPE string
94621
+ other TYPE i OPTIONAL
94622
+ PREFERRED PARAMETER val.`,
94623
+ goodExample: `METHODS meth
94624
+ IMPORTING
94625
+ val TYPE string OPTIONAL
94626
+ other TYPE i OPTIONAL
94627
+ PREFERRED PARAMETER val.`,
94628
+ };
94629
+ }
94630
+ getConfig() {
94631
+ return this.conf;
94632
+ }
94633
+ setConfig(conf) {
94634
+ this.conf = conf;
94635
+ }
94636
+ runParsed(file) {
94637
+ var _a;
94638
+ var _b;
94639
+ const issues = [];
94640
+ for (const statement of file.getStatements()) {
94641
+ const importing = statement.findFirstExpression(Expressions.MethodDefImporting);
94642
+ if (importing === undefined) {
94643
+ continue;
94644
+ }
94645
+ const preferred = this.preferredTokens(importing);
94646
+ if (preferred === undefined) {
94647
+ continue;
94648
+ }
94649
+ const mandatory = this.mandatoryParameters(importing);
94650
+ if (mandatory.length === 0) {
94651
+ continue;
94652
+ }
94653
+ const fix = edit_helper_1.EditHelper.mergeList(mandatory.map(p => edit_helper_1.EditHelper.insertAt(file, p.getLastToken().getEnd(), " OPTIONAL")));
94654
+ const name = (_b = (_a = mandatory[0].findFirstExpression(Expressions.MethodParamName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) !== null && _b !== void 0 ? _b : mandatory[0].concatTokens();
94655
+ const message = `PREFERRED PARAMETER is ignored while ${name} is not optional`;
94656
+ issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix));
94657
+ }
94658
+ return issues;
94659
+ }
94660
+ ////////////////
94661
+ /** The span of `PREFERRED PARAMETER <name>`, or undefined when the clause
94662
+ * does not carry the addition. */
94663
+ preferredTokens(importing) {
94664
+ const tokens = importing.getTokens();
94665
+ for (let i = 0; i + 2 < tokens.length; i++) {
94666
+ if (tokens[i].getStr().toUpperCase() === "PREFERRED"
94667
+ && tokens[i + 1].getStr().toUpperCase() === "PARAMETER") {
94668
+ return { start: tokens[i].getStart(), end: tokens[i + 2].getEnd() };
94669
+ }
94670
+ }
94671
+ return undefined;
94672
+ }
94673
+ /** The importing parameters that are neither OPTIONAL nor have a DEFAULT,
94674
+ * empty when every one of them may be left out. */
94675
+ mandatoryParameters(importing) {
94676
+ const ret = [];
94677
+ for (const param of importing.findDirectExpressions(Expressions.MethodParamOptional)) {
94678
+ const concat = param.concatTokens().toUpperCase();
94679
+ if (concat.endsWith(" OPTIONAL") || concat.includes(" DEFAULT ")) {
94680
+ continue;
94681
+ }
94682
+ ret.push(param);
94683
+ }
94684
+ return ret;
94685
+ }
94686
+ }
94687
+ exports.PreferredParameterIgnored = PreferredParameterIgnored;
94688
+ //# sourceMappingURL=preferred_parameter_ignored.js.map
94689
+
94690
+ /***/ },
94691
+
94762
94692
  /***/ "./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js"
94763
94693
  /*!********************************************************************************!*\
94764
94694
  !*** ./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js ***!
@@ -104275,7 +104205,8 @@ class Chunk {
104275
104205
  }
104276
104206
  const indentationByLine = this.mappings.length > 0 ? [] : undefined;
104277
104207
  for (const l of this.raw.split("\n")) {
104278
- if (l.startsWith("}")) {
104208
+ // trimStart, a pre-indented closing brace must still close its level
104209
+ if (l.trimStart().startsWith("}")) {
104279
104210
  i = i - 1;
104280
104211
  }
104281
104212
  // clamp so unbalanced braces never produce a negative indent/shift
@@ -104872,6 +104803,9 @@ class PGDatabaseSchema {
104872
104803
  else if (type instanceof abaplint.BasicTypes.IntegerType) {
104873
104804
  return `INT`;
104874
104805
  }
104806
+ else if (type instanceof abaplint.BasicTypes.Integer8Type) {
104807
+ return `BIGINT`;
104808
+ }
104875
104809
  else if (type instanceof abaplint.BasicTypes.FloatType
104876
104810
  || type instanceof abaplint.BasicTypes.FloatingPointType) {
104877
104811
  return `REAL`;
@@ -104995,6 +104929,9 @@ class SnowflakeDatabaseSchema {
104995
104929
  else if (type instanceof abaplint.BasicTypes.IntegerType) {
104996
104930
  return `INT`;
104997
104931
  }
104932
+ else if (type instanceof abaplint.BasicTypes.Integer8Type) {
104933
+ return `NUMBER(19)`;
104934
+ }
104998
104935
  else if (type instanceof abaplint.BasicTypes.FloatType
104999
104936
  || type instanceof abaplint.BasicTypes.FloatingPointType) {
105000
104937
  return `REAL`;
@@ -105120,6 +105057,9 @@ class SQLiteDatabaseSchema {
105120
105057
  else if (type instanceof abaplint.BasicTypes.IntegerType) {
105121
105058
  return `INT`;
105122
105059
  }
105060
+ else if (type instanceof abaplint.BasicTypes.Integer8Type) {
105061
+ return `INTEGER`;
105062
+ }
105123
105063
  else if (type instanceof abaplint.BasicTypes.FloatType
105124
105064
  || type instanceof abaplint.BasicTypes.FloatingPointType) {
105125
105065
  return `REAL`;
@@ -108183,22 +108123,18 @@ class ReduceBodyTranspiler {
108183
108123
  for (const declaration of declarations) {
108184
108124
  ret.appendString(declaration + "\n");
108185
108125
  }
108186
- let indent = "";
108187
- const levelIndents = [];
108126
+ // no manual indentation, Chunk.runIndentationLogic indents by brace depth,
108127
+ // pre-indented closing braces would not be recognized and drift the indentation
108188
108128
  for (const descriptor of descriptors) {
108189
- this.appendBlocks(ret, descriptor.beforeLoop, indent);
108190
- ret.appendString(indent + descriptor.open + "\n");
108191
- indent += " ";
108192
- levelIndents.push(indent);
108193
- this.appendBlocks(ret, descriptor.preBody, indent);
108129
+ this.appendBlocks(ret, descriptor.beforeLoop);
108130
+ ret.appendString(descriptor.open + "\n");
108131
+ this.appendBlocks(ret, descriptor.preBody);
108194
108132
  }
108195
- this.appendBlock(ret, this.transpileNext(body, traversal), indent);
108133
+ this.appendBlock(ret, this.transpileNext(body, traversal));
108196
108134
  for (let i = descriptors.length - 1; i >= 0; i--) {
108197
108135
  const descriptor = descriptors[i];
108198
- const currentIndent = levelIndents[i];
108199
- this.appendBlocks(ret, descriptor.postBody, currentIndent);
108200
- indent = currentIndent.substring(0, Math.max(0, currentIndent.length - 2));
108201
- ret.appendString(indent + descriptor.close + "\n");
108136
+ this.appendBlocks(ret, descriptor.postBody);
108137
+ ret.appendString(descriptor.close + "\n");
108202
108138
  }
108203
108139
  ret.appendString(`return ${returnField};\n`);
108204
108140
  ret.appendString("})())");
@@ -108418,15 +108354,15 @@ class ReduceBodyTranspiler {
108418
108354
  }
108419
108355
  return ret;
108420
108356
  }
108421
- appendBlocks(ret, blocks, indent) {
108357
+ appendBlocks(ret, blocks) {
108422
108358
  for (const block of blocks) {
108423
- this.appendBlock(ret, block, indent);
108359
+ this.appendBlock(ret, block);
108424
108360
  }
108425
108361
  }
108426
- appendBlock(ret, block, indent) {
108362
+ appendBlock(ret, block) {
108427
108363
  for (const line of block.split("\n")) {
108428
108364
  if (line.trim() !== "") {
108429
- ret.appendString(indent + line.replace(/\r/g, "") + "\n");
108365
+ ret.appendString(line.replace(/\r/g, "") + "\n");
108430
108366
  }
108431
108367
  }
108432
108368
  }
@@ -108542,11 +108478,15 @@ const corresponding_body_1 = __webpack_require__(/*! ./corresponding_body */ "./
108542
108478
  const filter_body_1 = __webpack_require__(/*! ./filter_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/filter_body.js");
108543
108479
  const reduce_body_1 = __webpack_require__(/*! ./reduce_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/reduce_body.js");
108544
108480
  const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
108481
+ const let_1 = __webpack_require__(/*! ./let */ "./node_modules/@abaplint/transpiler/build/src/expressions/let.js");
108545
108482
  const value_body_1 = __webpack_require__(/*! ./value_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/value_body.js");
108546
108483
  class SourceTranspiler {
108547
108484
  addGet;
108548
- constructor(addGet = false) {
108485
+ int8;
108486
+ /** int8: the calculation type is int8, each operation gets its left operand as an int8 */
108487
+ constructor(addGet = false, int8 = false) {
108549
108488
  this.addGet = addGet;
108489
+ this.int8 = int8;
108550
108490
  }
108551
108491
  // the operands of a chain of & / && (the rearranger leaves them as a binary
108552
108492
  // tree of Source nodes); an empty list when the node is not such a chain
@@ -108614,6 +108554,8 @@ class SourceTranspiler {
108614
108554
  break;
108615
108555
  }
108616
108556
  }
108557
+ // int8: whether the operand left of the next operator is already an int8
108558
+ let leftIsInt8 = false;
108617
108559
  for (let i = startIdx; i < children.length; i++) {
108618
108560
  const c = children[i];
108619
108561
  const isLast = i === children.length - 1;
@@ -108631,7 +108573,18 @@ class SourceTranspiler {
108631
108573
  ret.appendChunk(traversal.traverse(c));
108632
108574
  }
108633
108575
  else if (c.get() instanceof core_1.Expressions.ArithOperator) {
108634
- ret = new chunk_1.Chunk().appendChunk(traversal.traverse(c)).appendString("(").appendChunk(ret).appendString(",");
108576
+ // "/" rounds in calculation type int8, the runtime's divide() does not know the target
108577
+ const operator = this.int8 === true && c.concatTokens().trim() === "/"
108578
+ ? new chunk_1.Chunk().append("abap.operators.divideInt8", c, traversal)
108579
+ : traversal.traverse(c);
108580
+ if (this.int8 === true && leftIsInt8 === false) {
108581
+ ret = new chunk_1.Chunk().appendChunk(operator).appendString("(new abap.types.Integer8().set(").appendChunk(ret).appendString("),");
108582
+ }
108583
+ else {
108584
+ ret = new chunk_1.Chunk().appendChunk(operator).appendString("(").appendChunk(ret).appendString(",");
108585
+ }
108586
+ // the result of an operation with an int8 operand is an int8
108587
+ leftIsInt8 = true;
108635
108588
  post.appendString(")");
108636
108589
  if (this.addGet) {
108637
108590
  post.append(".get()", c, traversal);
@@ -108648,7 +108601,8 @@ class SourceTranspiler {
108648
108601
  }
108649
108602
  }
108650
108603
  else if (c.get() instanceof core_1.Expressions.Source) {
108651
- ret.appendChunk(new SourceTranspiler(this.addGet).transpile(c, traversal));
108604
+ ret.appendChunk(new SourceTranspiler(this.addGet, this.int8).transpile(c, traversal));
108605
+ leftIsInt8 = c.findDirectExpression(core_1.Expressions.ArithOperator) !== undefined;
108652
108606
  }
108653
108607
  else if (c.get() instanceof core_1.Expressions.Arrow) {
108654
108608
  ret = new chunk_1.Chunk().appendString("(").appendChunk(ret).appendString(").get().");
@@ -108684,13 +108638,19 @@ class SourceTranspiler {
108684
108638
  }
108685
108639
  ret = new chunk_1.Chunk().appendString(new _1.TypeNameOrInfer().transpile(typ, traversal).getCode());
108686
108640
  ret.appendString(".set(");
108687
- // todo: handle LET
108688
108641
  const context = new _1.TypeNameOrInfer().findType(typ, traversal);
108689
- ret.appendString(new SourceTranspiler().transpile(c.getFirstChild(), traversal, context).getCode());
108642
+ const convSource = c.findDirectExpression(core_1.Expressions.Source);
108643
+ ret.appendString(new SourceTranspiler().transpile(convSource, traversal, context).getCode());
108690
108644
  ret.appendString(")");
108691
108645
  if (this.addGet) {
108692
108646
  ret.appendString(".get()");
108693
108647
  }
108648
+ const convLet = c.findDirectExpression(core_1.Expressions.Let);
108649
+ if (convLet) {
108650
+ // the LET bindings are declared in a scope of their own, before the value is built
108651
+ const letCode = new let_1.LetTranspiler().transpile(convLet, traversal).getCode();
108652
+ ret = new chunk_1.Chunk().appendString(`(await (async () => { ${letCode} return ${ret.getCode()}; })())`);
108653
+ }
108694
108654
  }
108695
108655
  else if (c.get() instanceof core_1.Expressions.ValueBody) {
108696
108656
  continue;
@@ -109084,6 +109044,11 @@ class SQLCondTranspiler {
109084
109044
  ret += fieldName + " IS NULL";
109085
109045
  return ret;
109086
109046
  }
109047
+ const aggregation = c.findDirectExpression(abaplint.Expressions.SQLAggregation);
109048
+ if (aggregation && operator && source) {
109049
+ return aggregation.concatTokens() + " " + this.sqlOperator(operator.concatTokens()) + " "
109050
+ + this.sqlSource(source, traversal, filename, table, true);
109051
+ }
109087
109052
  if (fieldName === undefined || operator === undefined || source === undefined) {
109088
109053
  throw new Error("SQL Condition, transpiler todo2, " + c.concatTokens());
109089
109054
  }
@@ -109145,17 +109110,18 @@ class SQLCondTranspiler {
109145
109110
  }
109146
109111
  return ret + ")";
109147
109112
  }
109148
- sqlSource(source, traversal, filename, table) {
109113
+ sqlSource(source, traversal, filename, table, numericHost = false) {
109149
109114
  let ret = "";
109150
109115
  const simple = source.findDirectExpression(abaplint.Expressions.SimpleSource3);
109151
109116
  const hostExpression = source.findDirectExpression(abaplint.Expressions.Source);
109152
109117
  const alias = source.findDirectExpression(abaplint.Expressions.SQLAliasField);
109153
109118
  if (source.getFirstToken().getStr() === "@" && hostExpression) {
109154
109119
  const code = new source_1.SourceTranspiler(true).transpile(hostExpression, traversal).getCode();
109155
- ret += "'\" + " + code + " + \"'";
109120
+ ret += this.sqlHost(code, numericHost);
109156
109121
  }
109157
109122
  else if (simple && simple.findDirectExpression(abaplint.Expressions.Constant) === undefined) {
109158
- ret += "'\" + " + new simple_source3_1.SimpleSource3Transpiler(true).transpile(simple, traversal).getCode() + " + \"'";
109123
+ const code = new simple_source3_1.SimpleSource3Transpiler(true).transpile(simple, traversal).getCode();
109124
+ ret += this.sqlHost(code, numericHost);
109159
109125
  }
109160
109126
  else if (alias) {
109161
109127
  // SQLAliasField might be a SQL reference or value from ABAP interface
@@ -109190,6 +109156,12 @@ class SQLCondTranspiler {
109190
109156
  }
109191
109157
  return ret;
109192
109158
  }
109159
+ sqlHost(code, numericHost) {
109160
+ if (numericHost) {
109161
+ return `" + ((value) => typeof value === "number" || typeof value === "bigint" ? value : "'" + value + "'")(${code}) + "`;
109162
+ }
109163
+ return "'\" + " + code + " + \"'";
109164
+ }
109193
109165
  basicConditionNew(node, traversal, filename, table) {
109194
109166
  const sourceWithComponents = this.sourceWithComponents(node, traversal);
109195
109167
  if (sourceWithComponents) {
@@ -110805,6 +110777,7 @@ class ValueBodyTranspiler {
110805
110777
  const outerLetCode = outerLet === undefined
110806
110778
  ? undefined
110807
110779
  : new let_1.LetTranspiler().transpile(outerLet, traversal).getCode();
110780
+ let hasFor = false;
110808
110781
  const children = body.getChildren();
110809
110782
  for (let i = 0; i < children.length; i++) {
110810
110783
  const child = children[i];
@@ -110847,6 +110820,7 @@ class ValueBodyTranspiler {
110847
110820
  }
110848
110821
  }
110849
110822
  i = idx - 1;
110823
+ hasFor = true;
110850
110824
  const result = this.buildForChain(forNodes, typ, traversal, body, baseCode, outerLetCode);
110851
110825
  ret = result.chunk;
110852
110826
  post = result.post;
@@ -110874,14 +110848,18 @@ class ValueBodyTranspiler {
110874
110848
  throw new Error("ValueBodyTranspiler, unknown " + child.get().constructor.name + " \"" + child.concatTokens()) + "\"";
110875
110849
  }
110876
110850
  }
110877
- return ret.appendString(post);
110851
+ ret.appendString(post);
110852
+ if (outerLetCode !== undefined && hasFor === false) {
110853
+ // without FOR the LET bindings are declared here, in a scope of their own, before the value is built
110854
+ ret = new chunk_1.Chunk().appendString(`(await (async () => { ${outerLetCode} return ${ret.getCode()}; })())`);
110855
+ }
110856
+ return ret;
110878
110857
  }
110879
110858
  buildForChain(forNodes, typ, traversal, body, baseCode, outerLetCode) {
110880
110859
  const val = baseCode ?? new type_name_or_infer_1.TypeNameOrInfer().transpile(typ, traversal).getCode();
110881
110860
  const chunk = new chunk_1.Chunk();
110882
110861
  const preLoopDecls = outerLetCode === undefined ? [] : [outerLetCode];
110883
110862
  const descriptors = [];
110884
- const levelIndents = [];
110885
110863
  let uniqueCounter = 1;
110886
110864
  for (const child of forNodes) {
110887
110865
  const loop = child.findDirectExpression(core_1.Expressions.InlineLoopDefinition);
@@ -110997,11 +110975,11 @@ class ValueBodyTranspiler {
110997
110975
  letCode = new let_1.LetTranspiler().transpile(llet, traversal).getCode();
110998
110976
  }
110999
110977
  const condCode = traversal.traverse(cond).getCode();
111000
- const preCheck = hasWhile ? `if (!(${condCode})) {\n break;\n}` : "";
110978
+ const preCheck = hasWhile ? `if (!(${condCode})) {\nbreak;\n}` : "";
111001
110979
  const postLoop = [];
111002
110980
  postLoop.push(incrementLine);
111003
110981
  if (hasUntil) {
111004
- postLoop.push(`if (${condCode}) {\n break;\n}`);
110982
+ postLoop.push(`if (${condCode}) {\nbreak;\n}`);
111005
110983
  }
111006
110984
  descriptors.push({
111007
110985
  beforeLoop: [declare, `${counterName}.set(${start});`],
@@ -111016,34 +110994,31 @@ class ValueBodyTranspiler {
111016
110994
  throw new Error("ValueBodyTranspiler FOR internal error");
111017
110995
  }
111018
110996
  chunk.appendString("await (async () => {\n");
111019
- this.appendBlocks(chunk, preLoopDecls, "");
110997
+ this.appendBlocks(chunk, preLoopDecls);
111020
110998
  chunk.appendString(`const VAL = ${val};\n`);
111021
- let indent = "";
110999
+ // no manual indentation, Chunk.runIndentationLogic indents by brace depth,
111000
+ // pre-indented closing braces would not be recognized and drift the indentation
111022
111001
  for (const desc of descriptors) {
111023
- this.appendBlocks(chunk, desc.beforeLoop, indent);
111024
- chunk.appendString(indent + desc.open + "\n");
111025
- indent += " ";
111026
- levelIndents.push(indent);
111027
- this.appendBlocks(chunk, desc.preBody, indent);
111002
+ this.appendBlocks(chunk, desc.beforeLoop);
111003
+ chunk.appendString(desc.open + "\n");
111004
+ this.appendBlocks(chunk, desc.preBody);
111028
111005
  }
111029
- chunk.appendString(indent + "VAL");
111006
+ chunk.appendString("VAL");
111030
111007
  let post = ";\n";
111031
111008
  for (let i = descriptors.length - 1; i >= 0; i--) {
111032
111009
  const desc = descriptors[i];
111033
- const currentIndent = levelIndents[i] ?? "";
111034
- post += this.blocksToString(desc.postBody, currentIndent);
111035
- const parentIndent = currentIndent.substring(0, Math.max(0, currentIndent.length - 2));
111036
- post += parentIndent + desc.close + "\n";
111010
+ post += this.blocksToString(desc.postBody);
111011
+ post += desc.close + "\n";
111037
111012
  }
111038
111013
  post += "return VAL;\n})()";
111039
111014
  return { chunk, post };
111040
111015
  }
111041
- appendBlocks(chunk, blocks, indent) {
111016
+ appendBlocks(chunk, blocks) {
111042
111017
  for (const block of blocks) {
111043
- this.appendBlock(chunk, block, indent);
111018
+ this.appendBlock(chunk, block);
111044
111019
  }
111045
111020
  }
111046
- appendBlock(chunk, block, indent) {
111021
+ appendBlock(chunk, block) {
111047
111022
  if (block === "") {
111048
111023
  return;
111049
111024
  }
@@ -111053,10 +111028,10 @@ class ValueBodyTranspiler {
111053
111028
  if (clean.trim() === "") {
111054
111029
  continue;
111055
111030
  }
111056
- chunk.appendString(indent + clean + "\n");
111031
+ chunk.appendString(clean + "\n");
111057
111032
  }
111058
111033
  }
111059
- blocksToString(blocks, indent) {
111034
+ blocksToString(blocks) {
111060
111035
  let ret = "";
111061
111036
  for (const block of blocks) {
111062
111037
  if (block === "") {
@@ -111068,7 +111043,7 @@ class ValueBodyTranspiler {
111068
111043
  if (clean.trim() === "") {
111069
111044
  continue;
111070
111045
  }
111071
- ret += indent + clean + "\n";
111046
+ ret += clean + "\n";
111072
111047
  }
111073
111048
  }
111074
111049
  return ret;
@@ -112804,6 +112779,190 @@ exports.Requires = Requires;
112804
112779
 
112805
112780
  /***/ },
112806
112781
 
112782
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/_dataset.js"
112783
+ /*!****************************************************************************!*\
112784
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/_dataset.js ***!
112785
+ \****************************************************************************/
112786
+ (__unused_webpack_module, exports, __webpack_require__) {
112787
+
112788
+ "use strict";
112789
+
112790
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
112791
+ if (k2 === undefined) k2 = k;
112792
+ var desc = Object.getOwnPropertyDescriptor(m, k);
112793
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
112794
+ desc = { enumerable: true, get: function() { return m[k]; } };
112795
+ }
112796
+ Object.defineProperty(o, k2, desc);
112797
+ }) : (function(o, m, k, k2) {
112798
+ if (k2 === undefined) k2 = k;
112799
+ o[k2] = m[k];
112800
+ }));
112801
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
112802
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
112803
+ }) : function(o, v) {
112804
+ o["default"] = v;
112805
+ });
112806
+ var __importStar = (this && this.__importStar) || (function () {
112807
+ var ownKeys = function(o) {
112808
+ ownKeys = Object.getOwnPropertyNames || function (o) {
112809
+ var ar = [];
112810
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
112811
+ return ar;
112812
+ };
112813
+ return ownKeys(o);
112814
+ };
112815
+ return function (mod) {
112816
+ if (mod && mod.__esModule) return mod;
112817
+ var result = {};
112818
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
112819
+ __setModuleDefault(result, mod);
112820
+ return result;
112821
+ };
112822
+ })();
112823
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
112824
+ exports.DatasetOperands = void 0;
112825
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
112826
+ /** the Sources and Targets of a DATASET statement, each found by the
112827
+ * keywords right in front of it: "MESSAGE" in "FOR INPUT IN BINARY MODE
112828
+ * MESSAGE m", "LENGTH" only when not "MAXIMUM LENGTH" or "ACTUAL LENGTH" */
112829
+ class DatasetOperands {
112830
+ operands = [];
112831
+ words = [];
112832
+ constructor(node, traversal) {
112833
+ let keywords = [];
112834
+ for (const c of node.getChildren()) {
112835
+ if (c instanceof abaplint.Nodes.TokenNode) {
112836
+ keywords.push(c.getFirstToken().getStr().toUpperCase());
112837
+ this.words.push(c.getFirstToken().getStr().toUpperCase());
112838
+ }
112839
+ else if (c instanceof abaplint.Nodes.ExpressionNode) {
112840
+ this.operands.push({ keywords, code: traversal.traverse(c).getCode() });
112841
+ keywords = [];
112842
+ }
112843
+ }
112844
+ }
112845
+ /** whether the statement has these keywords in a row: its own tokens only,
112846
+ * never the text of an operand, so a variable lv_type or a literal
112847
+ * 'no end of line' is not an addition */
112848
+ has(words) {
112849
+ // abaplint splits UTF-8, NON-UNICODE and BYTE-ORDER into three tokens
112850
+ const joined = this.words.join(" ").replace(/ - /g, "-");
112851
+ return (" " + joined + " ").includes(" " + words + " ");
112852
+ }
112853
+ /** the dataset name, or the source of TRANSFER: the first operand */
112854
+ first() {
112855
+ return this.operands[0].code;
112856
+ }
112857
+ after(words, notAfter = []) {
112858
+ const want = words.split(" ");
112859
+ for (const o of this.operands.slice(1)) {
112860
+ const tail = o.keywords.slice(-want.length);
112861
+ const before = o.keywords[o.keywords.length - want.length - 1];
112862
+ if (tail.join(" ") === words && (before === undefined || notAfter.includes(before) === false)) {
112863
+ return o.code;
112864
+ }
112865
+ }
112866
+ return undefined;
112867
+ }
112868
+ }
112869
+ exports.DatasetOperands = DatasetOperands;
112870
+ //# sourceMappingURL=_dataset.js.map
112871
+
112872
+ /***/ },
112873
+
112874
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/_selection.js"
112875
+ /*!******************************************************************************!*\
112876
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/_selection.js ***!
112877
+ \******************************************************************************/
112878
+ (__unused_webpack_module, exports, __webpack_require__) {
112879
+
112880
+ "use strict";
112881
+
112882
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
112883
+ if (k2 === undefined) k2 = k;
112884
+ var desc = Object.getOwnPropertyDescriptor(m, k);
112885
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
112886
+ desc = { enumerable: true, get: function() { return m[k]; } };
112887
+ }
112888
+ Object.defineProperty(o, k2, desc);
112889
+ }) : (function(o, m, k, k2) {
112890
+ if (k2 === undefined) k2 = k;
112891
+ o[k2] = m[k];
112892
+ }));
112893
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
112894
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
112895
+ }) : function(o, v) {
112896
+ o["default"] = v;
112897
+ });
112898
+ var __importStar = (this && this.__importStar) || (function () {
112899
+ var ownKeys = function(o) {
112900
+ ownKeys = Object.getOwnPropertyNames || function (o) {
112901
+ var ar = [];
112902
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
112903
+ return ar;
112904
+ };
112905
+ return ownKeys(o);
112906
+ };
112907
+ return function (mod) {
112908
+ if (mod && mod.__esModule) return mod;
112909
+ var result = {};
112910
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
112911
+ __setModuleDefault(result, mod);
112912
+ return result;
112913
+ };
112914
+ })();
112915
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
112916
+ exports.SelectionDefault = void 0;
112917
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
112918
+ const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
112919
+ /** PARAMETERS and SELECT-OPTIONS declare program variables that exist, with their
112920
+ * DEFAULT values, before INITIALIZATION runs. Without LOWER CASE a character-like
112921
+ * default is upper-cased (measured on a 7.5x system: 'abcdef' into a parameter of
112922
+ * length 4 is "ABCD", a string parameter and the LOW of a select-option likewise) */
112923
+ class SelectionDefault {
112924
+ static variable(node, traversal) {
112925
+ const token = node.findDirectExpression(abaplint.Expressions.FieldSub)?.getFirstToken();
112926
+ if (token === undefined) {
112927
+ return undefined;
112928
+ }
112929
+ const found = traversal.findCurrentScopeByToken(token)?.findVariable(token.getStr());
112930
+ if (found === undefined) {
112931
+ return undefined;
112932
+ }
112933
+ return {
112934
+ name: traversal_1.Traversal.prefixVariable(traversal_1.Traversal.escapeNamespace(found.getName().toLowerCase())),
112935
+ type: found.getType(),
112936
+ };
112937
+ }
112938
+ /** the expression after a keyword of the statement, eg. DEFAULT; only a keyword
112939
+ * token counts, an operand named like the keyword does not */
112940
+ static after(node, keyword) {
112941
+ const children = node.getChildren();
112942
+ for (let i = 0; i < children.length - 1; i++) {
112943
+ if (children[i] instanceof abaplint.Nodes.TokenNode && children[i].concatTokens().toUpperCase() === keyword) {
112944
+ return children[i + 1];
112945
+ }
112946
+ }
112947
+ return undefined;
112948
+ }
112949
+ /** sets the target to a DEFAULT operand, a Constant or a FieldChain, and upper-cases
112950
+ * it when the target is character-like and the statement has no LOWER CASE */
112951
+ static set(node, target, targetType, operand, traversal) {
112952
+ let code = "\n" + target + ".set(" + traversal.traverse(operand).getCode() + ");";
112953
+ const characterLike = targetType instanceof abaplint.BasicTypes.CharacterType
112954
+ || targetType instanceof abaplint.BasicTypes.StringType;
112955
+ if (node.findDirectTokenByText("LOWER") === undefined && characterLike === true) {
112956
+ code += "\n" + target + ".set(abap.builtin.to_upper({val: " + target + "}));";
112957
+ }
112958
+ return code;
112959
+ }
112960
+ }
112961
+ exports.SelectionDefault = SelectionDefault;
112962
+ //# sourceMappingURL=_selection.js.map
112963
+
112964
+ /***/ },
112965
+
112807
112966
  /***/ "./node_modules/@abaplint/transpiler/build/src/statements/add.js"
112808
112967
  /*!***********************************************************************!*\
112809
112968
  !*** ./node_modules/@abaplint/transpiler/build/src/statements/add.js ***!
@@ -113094,15 +113253,16 @@ class AssignTranspiler {
113094
113253
  if (node?.findFirstExpression(abaplint.Expressions.TableExpression) === undefined) {
113095
113254
  return code;
113096
113255
  }
113256
+ // not indented, Chunk.runIndentationLogic indents by brace depth
113097
113257
  return `(await (async () => {
113098
- try {
113099
- return ${code};
113100
- } catch (error) {
113101
- if (abap.isLineNotFound(error)) {
113102
- return undefined;
113103
- }
113104
- throw error;
113105
- }
113258
+ try {
113259
+ return ${code};
113260
+ } catch (error) {
113261
+ if (abap.isLineNotFound(error)) {
113262
+ return undefined;
113263
+ }
113264
+ throw error;
113265
+ }
113106
113266
  })())`;
113107
113267
  }
113108
113268
  transpile(node, traversal) {
@@ -113586,7 +113746,7 @@ class CallTranspiler {
113586
113746
  post += `\nabap.builtin.sy.get().subrc.set(0);
113587
113747
  } catch (e) {
113588
113748
  if (e.classic) {
113589
- switch (e.classic.toUpperCase()) {\n`;
113749
+ switch (e.classic.toUpperCase()) {\n`;
113590
113750
  for (const e of node.findAllExpressions(abaplint.Expressions.ParameterException)) {
113591
113751
  const name = e.getFirstToken().getStr().toUpperCase();
113592
113752
  // todo, also handle SimpleChain,
@@ -113605,9 +113765,9 @@ if (e.classic) {
113605
113765
  post += `case "${name}": abap.builtin.sy.get().subrc.set(${value}); break;\n`;
113606
113766
  }
113607
113767
  }
113608
- post += ` }
113768
+ post += `}
113609
113769
  } else {
113610
- throw e;
113770
+ throw e;
113611
113771
  }
113612
113772
  }`;
113613
113773
  return { pre, post };
@@ -113692,12 +113852,13 @@ class CallFunctionTranspiler {
113692
113852
  }
113693
113853
  const calling = node.findExpressionAfterToken("CALLING");
113694
113854
  const dest = node.findDirectExpression(abaplint.Expressions.Destination)?.findDirectExpression(abaplint.Expressions.Source);
113695
- if (dest) {
113855
+ const updateTask = node.findDirectTokenByText("UPDATE") !== undefined;
113856
+ if (dest && updateTask === false) {
113696
113857
  const s = new expressions_1.SourceTranspiler(true).transpile(dest, traversal);
113697
113858
  param = param.replace("{", ",").replace(/}$/, "");
113698
113859
  ret.appendString(`await abap.statements.callFunction({name:${fmname},destination:${s.getCode()}${param}});`);
113699
113860
  }
113700
- else if (calling) {
113861
+ else if (calling && updateTask === false) {
113701
113862
  param = param.replace("{", ",").replace(/}$/, "");
113702
113863
  // typically used in combination with STARTING NEW TASK so dont await,
113703
113864
  ret.appendString(`abap.statements.callFunction({name:${fmname},calling:this.${calling.concatTokens().toLowerCase()}${param}});`);
@@ -113707,7 +113868,13 @@ class CallFunctionTranspiler {
113707
113868
  const call = `abap.FunctionModules[${fmname}]`;
113708
113869
  // eslint-disable-next-line max-len
113709
113870
  ret.appendString(`if (${call} === undefined) { if (${illegalFunc} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw await new ${illegalFunc}().constructor_({function: new abap.types.String().set(${fmname})});} }\n`);
113710
- ret.appendString(`await ${call}(${param});`);
113871
+ if (updateTask) {
113872
+ param = param.replace("{", ",").replace(/}$/, "");
113873
+ ret.appendString(`await abap.statements.callFunction({name:${fmname},updateTask:true${param}});`);
113874
+ }
113875
+ else {
113876
+ ret.appendString(`await ${call}(${param});`);
113877
+ }
113711
113878
  }
113712
113879
  if (exceptions) {
113713
113880
  const build = call_1.CallTranspiler.buildExceptions(exceptions);
@@ -114033,202 +114200,266 @@ var __importStar = (this && this.__importStar) || (function () {
114033
114200
  };
114034
114201
  })();
114035
114202
  Object.defineProperty(exports, "__esModule", ({ value: true }));
114036
- exports.CheckTranspiler = void 0;
114203
+ exports.CheckTranspiler = void 0;
114204
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
114205
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114206
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/transpiler/build/src/statements/index.js");
114207
+ class CheckTranspiler {
114208
+ transpile(node, traversal) {
114209
+ const cond = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Cond));
114210
+ const ret = new chunk_1.Chunk();
114211
+ ret.append("if (!(", node, traversal);
114212
+ ret.appendChunk(cond);
114213
+ ret.appendString(")) {\n");
114214
+ if (traversal.isInsideLoop(node)) {
114215
+ ret.appendString("continue;");
114216
+ }
114217
+ else {
114218
+ ret.appendChunk(new _1.ReturnTranspiler().transpile(node, traversal));
114219
+ }
114220
+ ret.append("\n}", node.getLastToken(), traversal);
114221
+ return ret;
114222
+ }
114223
+ }
114224
+ exports.CheckTranspiler = CheckTranspiler;
114225
+ //# sourceMappingURL=check.js.map
114226
+
114227
+ /***/ },
114228
+
114229
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_deferred.js"
114230
+ /*!**********************************************************************************!*\
114231
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_deferred.js ***!
114232
+ \**********************************************************************************/
114233
+ (__unused_webpack_module, exports, __webpack_require__) {
114234
+
114235
+ "use strict";
114236
+
114237
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
114238
+ exports.ClassDeferredTranspiler = void 0;
114239
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114240
+ class ClassDeferredTranspiler {
114241
+ transpile(_node, _traversal) {
114242
+ return new chunk_1.Chunk("");
114243
+ }
114244
+ }
114245
+ exports.ClassDeferredTranspiler = ClassDeferredTranspiler;
114246
+ //# sourceMappingURL=class_deferred.js.map
114247
+
114248
+ /***/ },
114249
+
114250
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_definition_load.js"
114251
+ /*!*****************************************************************************************!*\
114252
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_definition_load.js ***!
114253
+ \*****************************************************************************************/
114254
+ (__unused_webpack_module, exports, __webpack_require__) {
114255
+
114256
+ "use strict";
114257
+
114258
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
114259
+ exports.ClassDefinitionLoadTranspiler = void 0;
114260
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114261
+ class ClassDefinitionLoadTranspiler {
114262
+ transpile(_node, _traversal) {
114263
+ // for now, do nothing
114264
+ return new chunk_1.Chunk(``);
114265
+ }
114266
+ }
114267
+ exports.ClassDefinitionLoadTranspiler = ClassDefinitionLoadTranspiler;
114268
+ //# sourceMappingURL=class_definition_load.js.map
114269
+
114270
+ /***/ },
114271
+
114272
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_implementation.js"
114273
+ /*!****************************************************************************************!*\
114274
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_implementation.js ***!
114275
+ \****************************************************************************************/
114276
+ (__unused_webpack_module, exports, __webpack_require__) {
114277
+
114278
+ "use strict";
114279
+
114280
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
114281
+ if (k2 === undefined) k2 = k;
114282
+ var desc = Object.getOwnPropertyDescriptor(m, k);
114283
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
114284
+ desc = { enumerable: true, get: function() { return m[k]; } };
114285
+ }
114286
+ Object.defineProperty(o, k2, desc);
114287
+ }) : (function(o, m, k, k2) {
114288
+ if (k2 === undefined) k2 = k;
114289
+ o[k2] = m[k];
114290
+ }));
114291
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
114292
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
114293
+ }) : function(o, v) {
114294
+ o["default"] = v;
114295
+ });
114296
+ var __importStar = (this && this.__importStar) || (function () {
114297
+ var ownKeys = function(o) {
114298
+ ownKeys = Object.getOwnPropertyNames || function (o) {
114299
+ var ar = [];
114300
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
114301
+ return ar;
114302
+ };
114303
+ return ownKeys(o);
114304
+ };
114305
+ return function (mod) {
114306
+ if (mod && mod.__esModule) return mod;
114307
+ var result = {};
114308
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
114309
+ __setModuleDefault(result, mod);
114310
+ return result;
114311
+ };
114312
+ })();
114313
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
114314
+ exports.ClassImplementationTranspiler = void 0;
114315
+ /* eslint-disable max-len */
114316
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
114317
+ const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
114318
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114319
+ class ClassImplementationTranspiler {
114320
+ transpile(node, traversal) {
114321
+ const token = node.findFirstExpression(abaplint.Expressions.ClassName).getFirstToken();
114322
+ const def = traversal.getClassDefinition(token);
114323
+ let ret = "class " + traversal_1.Traversal.escapeNamespace(token.getStr().toLowerCase());
114324
+ if (token.getStr().toLowerCase() === "cx_root") {
114325
+ // special case for exceptions
114326
+ ret += " extends Error";
114327
+ }
114328
+ else if (def?.getSuperClass()) {
114329
+ ret += " extends " + traversal_1.Traversal.escapeNamespace(def?.getSuperClass()?.toLowerCase());
114330
+ }
114331
+ const scope = traversal.findCurrentScopeByToken(token);
114332
+ return new chunk_1.Chunk().append(ret + ` {
114333
+ static STATIC_SUPER = ${traversal_1.Traversal.escapeNamespace(def?.getSuperClass()?.toLowerCase())};
114334
+ static INTERNAL_TYPE = 'CLAS';
114335
+ static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
114336
+ static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
114337
+ static ATTRIBUTES = {${Array.from(traversal.buildAttributes(def, scope)).join(",\n")}};
114338
+ static METHODS = {${traversal.buildMethods(def).join(",\n")}};`, node, traversal);
114339
+ }
114340
+ findImplementedInterface(traversal, def, scope) {
114341
+ if (def === undefined || scope === undefined) {
114342
+ return [];
114343
+ }
114344
+ const list = def.getImplementing().map(i => i.name.toUpperCase());
114345
+ for (const i of def.getImplementing()) {
114346
+ const idef = traversal.findInterfaceDefinition(i.name, scope);
114347
+ list.push(...this.findImplementedInterface(traversal, idef, scope));
114348
+ }
114349
+ return list;
114350
+ }
114351
+ findImplementedByClass(traversal, def, scope) {
114352
+ if (def === undefined || scope === undefined) {
114353
+ return [];
114354
+ }
114355
+ const list = def.getImplementing().map(i => i.name.toUpperCase());
114356
+ for (const i of def.getImplementing()) {
114357
+ const idef = traversal.findInterfaceDefinition(i.name, scope);
114358
+ list.push(...this.findImplementedInterface(traversal, idef, scope));
114359
+ }
114360
+ let sup = def.getSuperClass();
114361
+ while (sup !== undefined) {
114362
+ const sdef = traversal.findClassDefinition(sup, scope);
114363
+ list.push(...this.findImplementedByClass(traversal, sdef, scope));
114364
+ sup = sdef?.getSuperClass();
114365
+ }
114366
+ return list;
114367
+ }
114368
+ }
114369
+ exports.ClassImplementationTranspiler = ClassImplementationTranspiler;
114370
+ //# sourceMappingURL=class_implementation.js.map
114371
+
114372
+ /***/ },
114373
+
114374
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_local_friends.js"
114375
+ /*!***************************************************************************************!*\
114376
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_local_friends.js ***!
114377
+ \***************************************************************************************/
114378
+ (__unused_webpack_module, exports, __webpack_require__) {
114379
+
114380
+ "use strict";
114381
+
114382
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
114383
+ exports.ClassLocalFriendsTranspiler = void 0;
114384
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114385
+ class ClassLocalFriendsTranspiler {
114386
+ transpile(_node, _traversal) {
114387
+ return new chunk_1.Chunk("");
114388
+ }
114389
+ }
114390
+ exports.ClassLocalFriendsTranspiler = ClassLocalFriendsTranspiler;
114391
+ //# sourceMappingURL=class_local_friends.js.map
114392
+
114393
+ /***/ },
114394
+
114395
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/clear.js"
114396
+ /*!*************************************************************************!*\
114397
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/clear.js ***!
114398
+ \*************************************************************************/
114399
+ (__unused_webpack_module, exports, __webpack_require__) {
114400
+
114401
+ "use strict";
114402
+
114403
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
114404
+ if (k2 === undefined) k2 = k;
114405
+ var desc = Object.getOwnPropertyDescriptor(m, k);
114406
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
114407
+ desc = { enumerable: true, get: function() { return m[k]; } };
114408
+ }
114409
+ Object.defineProperty(o, k2, desc);
114410
+ }) : (function(o, m, k, k2) {
114411
+ if (k2 === undefined) k2 = k;
114412
+ o[k2] = m[k];
114413
+ }));
114414
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
114415
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
114416
+ }) : function(o, v) {
114417
+ o["default"] = v;
114418
+ });
114419
+ var __importStar = (this && this.__importStar) || (function () {
114420
+ var ownKeys = function(o) {
114421
+ ownKeys = Object.getOwnPropertyNames || function (o) {
114422
+ var ar = [];
114423
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
114424
+ return ar;
114425
+ };
114426
+ return ownKeys(o);
114427
+ };
114428
+ return function (mod) {
114429
+ if (mod && mod.__esModule) return mod;
114430
+ var result = {};
114431
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
114432
+ __setModuleDefault(result, mod);
114433
+ return result;
114434
+ };
114435
+ })();
114436
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
114437
+ exports.ClearTranspiler = void 0;
114037
114438
  const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
114038
114439
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114039
- const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/transpiler/build/src/statements/index.js");
114040
- class CheckTranspiler {
114440
+ class ClearTranspiler {
114041
114441
  transpile(node, traversal) {
114042
- const cond = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Cond));
114442
+ const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));
114443
+ // Reference implementation for the source-map convention:
114444
+ // - keep the target's own expression-level mappings by appending its Chunk
114445
+ // (do NOT flatten with target.getCode(), that discards the mappings)
114446
+ // - map the trailing generated syntax to the statement's last token, not
114447
+ // getEnd() which points one column past the statement
114043
114448
  const ret = new chunk_1.Chunk();
114044
- ret.append("if (!(", node, traversal);
114045
- ret.appendChunk(cond);
114046
- ret.appendString(")) {\n");
114047
- if (traversal.isInsideLoop(node)) {
114048
- ret.appendString("continue;");
114049
- }
114050
- else {
114051
- ret.appendChunk(new _1.ReturnTranspiler().transpile(node, traversal));
114052
- }
114053
- ret.append("\n}", node.getLastToken(), traversal);
114449
+ ret.appendChunk(target);
114450
+ ret.append(".clear();", node.getLastToken(), traversal);
114054
114451
  return ret;
114055
114452
  }
114056
114453
  }
114057
- exports.CheckTranspiler = CheckTranspiler;
114058
- //# sourceMappingURL=check.js.map
114059
-
114060
- /***/ },
114061
-
114062
- /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_deferred.js"
114063
- /*!**********************************************************************************!*\
114064
- !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_deferred.js ***!
114065
- \**********************************************************************************/
114066
- (__unused_webpack_module, exports, __webpack_require__) {
114067
-
114068
- "use strict";
114069
-
114070
- Object.defineProperty(exports, "__esModule", ({ value: true }));
114071
- exports.ClassDeferredTranspiler = void 0;
114072
- const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114073
- class ClassDeferredTranspiler {
114074
- transpile(_node, _traversal) {
114075
- return new chunk_1.Chunk("");
114076
- }
114077
- }
114078
- exports.ClassDeferredTranspiler = ClassDeferredTranspiler;
114079
- //# sourceMappingURL=class_deferred.js.map
114080
-
114081
- /***/ },
114082
-
114083
- /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_definition_load.js"
114084
- /*!*****************************************************************************************!*\
114085
- !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_definition_load.js ***!
114086
- \*****************************************************************************************/
114087
- (__unused_webpack_module, exports, __webpack_require__) {
114088
-
114089
- "use strict";
114090
-
114091
- Object.defineProperty(exports, "__esModule", ({ value: true }));
114092
- exports.ClassDefinitionLoadTranspiler = void 0;
114093
- const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114094
- class ClassDefinitionLoadTranspiler {
114095
- transpile(_node, _traversal) {
114096
- // for now, do nothing
114097
- return new chunk_1.Chunk(``);
114098
- }
114099
- }
114100
- exports.ClassDefinitionLoadTranspiler = ClassDefinitionLoadTranspiler;
114101
- //# sourceMappingURL=class_definition_load.js.map
114102
-
114103
- /***/ },
114104
-
114105
- /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_implementation.js"
114106
- /*!****************************************************************************************!*\
114107
- !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_implementation.js ***!
114108
- \****************************************************************************************/
114109
- (__unused_webpack_module, exports, __webpack_require__) {
114110
-
114111
- "use strict";
114112
-
114113
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
114114
- if (k2 === undefined) k2 = k;
114115
- var desc = Object.getOwnPropertyDescriptor(m, k);
114116
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
114117
- desc = { enumerable: true, get: function() { return m[k]; } };
114118
- }
114119
- Object.defineProperty(o, k2, desc);
114120
- }) : (function(o, m, k, k2) {
114121
- if (k2 === undefined) k2 = k;
114122
- o[k2] = m[k];
114123
- }));
114124
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
114125
- Object.defineProperty(o, "default", { enumerable: true, value: v });
114126
- }) : function(o, v) {
114127
- o["default"] = v;
114128
- });
114129
- var __importStar = (this && this.__importStar) || (function () {
114130
- var ownKeys = function(o) {
114131
- ownKeys = Object.getOwnPropertyNames || function (o) {
114132
- var ar = [];
114133
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
114134
- return ar;
114135
- };
114136
- return ownKeys(o);
114137
- };
114138
- return function (mod) {
114139
- if (mod && mod.__esModule) return mod;
114140
- var result = {};
114141
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
114142
- __setModuleDefault(result, mod);
114143
- return result;
114144
- };
114145
- })();
114146
- Object.defineProperty(exports, "__esModule", ({ value: true }));
114147
- exports.ClassImplementationTranspiler = void 0;
114148
- /* eslint-disable max-len */
114149
- const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
114150
- const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@abaplint/transpiler/build/src/traversal.js");
114151
- const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114152
- class ClassImplementationTranspiler {
114153
- transpile(node, traversal) {
114154
- const token = node.findFirstExpression(abaplint.Expressions.ClassName).getFirstToken();
114155
- const def = traversal.getClassDefinition(token);
114156
- let ret = "class " + traversal_1.Traversal.escapeNamespace(token.getStr().toLowerCase());
114157
- if (token.getStr().toLowerCase() === "cx_root") {
114158
- // special case for exceptions
114159
- ret += " extends Error";
114160
- }
114161
- else if (def?.getSuperClass()) {
114162
- ret += " extends " + traversal_1.Traversal.escapeNamespace(def?.getSuperClass()?.toLowerCase());
114163
- }
114164
- const scope = traversal.findCurrentScopeByToken(token);
114165
- return new chunk_1.Chunk().append(ret + ` {
114166
- static STATIC_SUPER = ${traversal_1.Traversal.escapeNamespace(def?.getSuperClass()?.toLowerCase())};
114167
- static INTERNAL_TYPE = 'CLAS';
114168
- static INTERNAL_NAME = '${traversal.buildInternalName(token.getStr(), def)}';
114169
- static IMPLEMENTED_INTERFACES = [${this.findImplementedByClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
114170
- static ATTRIBUTES = {${Array.from(traversal.buildAttributes(def, scope)).join(",\n")}};
114171
- static METHODS = {${traversal.buildMethods(def).join(",\n")}};`, node, traversal);
114172
- }
114173
- findImplementedInterface(traversal, def, scope) {
114174
- if (def === undefined || scope === undefined) {
114175
- return [];
114176
- }
114177
- const list = def.getImplementing().map(i => i.name.toUpperCase());
114178
- for (const i of def.getImplementing()) {
114179
- const idef = traversal.findInterfaceDefinition(i.name, scope);
114180
- list.push(...this.findImplementedInterface(traversal, idef, scope));
114181
- }
114182
- return list;
114183
- }
114184
- findImplementedByClass(traversal, def, scope) {
114185
- if (def === undefined || scope === undefined) {
114186
- return [];
114187
- }
114188
- const list = def.getImplementing().map(i => i.name.toUpperCase());
114189
- for (const i of def.getImplementing()) {
114190
- const idef = traversal.findInterfaceDefinition(i.name, scope);
114191
- list.push(...this.findImplementedInterface(traversal, idef, scope));
114192
- }
114193
- let sup = def.getSuperClass();
114194
- while (sup !== undefined) {
114195
- const sdef = traversal.findClassDefinition(sup, scope);
114196
- list.push(...this.findImplementedByClass(traversal, sdef, scope));
114197
- sup = sdef?.getSuperClass();
114198
- }
114199
- return list;
114200
- }
114201
- }
114202
- exports.ClassImplementationTranspiler = ClassImplementationTranspiler;
114203
- //# sourceMappingURL=class_implementation.js.map
114204
-
114205
- /***/ },
114206
-
114207
- /***/ "./node_modules/@abaplint/transpiler/build/src/statements/class_local_friends.js"
114208
- /*!***************************************************************************************!*\
114209
- !*** ./node_modules/@abaplint/transpiler/build/src/statements/class_local_friends.js ***!
114210
- \***************************************************************************************/
114211
- (__unused_webpack_module, exports, __webpack_require__) {
114212
-
114213
- "use strict";
114214
-
114215
- Object.defineProperty(exports, "__esModule", ({ value: true }));
114216
- exports.ClassLocalFriendsTranspiler = void 0;
114217
- const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114218
- class ClassLocalFriendsTranspiler {
114219
- transpile(_node, _traversal) {
114220
- return new chunk_1.Chunk("");
114221
- }
114222
- }
114223
- exports.ClassLocalFriendsTranspiler = ClassLocalFriendsTranspiler;
114224
- //# sourceMappingURL=class_local_friends.js.map
114454
+ exports.ClearTranspiler = ClearTranspiler;
114455
+ //# sourceMappingURL=clear.js.map
114225
114456
 
114226
114457
  /***/ },
114227
114458
 
114228
- /***/ "./node_modules/@abaplint/transpiler/build/src/statements/clear.js"
114229
- /*!*************************************************************************!*\
114230
- !*** ./node_modules/@abaplint/transpiler/build/src/statements/clear.js ***!
114231
- \*************************************************************************/
114459
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js"
114460
+ /*!********************************************************************************!*\
114461
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js ***!
114462
+ \********************************************************************************/
114232
114463
  (__unused_webpack_module, exports, __webpack_require__) {
114233
114464
 
114234
114465
  "use strict";
@@ -114267,32 +114498,24 @@ var __importStar = (this && this.__importStar) || (function () {
114267
114498
  };
114268
114499
  })();
114269
114500
  Object.defineProperty(exports, "__esModule", ({ value: true }));
114270
- exports.ClearTranspiler = void 0;
114501
+ exports.CloseCursorTranspiler = void 0;
114271
114502
  const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
114272
114503
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114273
- class ClearTranspiler {
114504
+ class CloseCursorTranspiler {
114274
114505
  transpile(node, traversal) {
114275
- const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));
114276
- // Reference implementation for the source-map convention:
114277
- // - keep the target's own expression-level mappings by appending its Chunk
114278
- // (do NOT flatten with target.getCode(), that discards the mappings)
114279
- // - map the trailing generated syntax to the statement's last token, not
114280
- // getEnd() which points one column past the statement
114281
- const ret = new chunk_1.Chunk();
114282
- ret.appendChunk(target);
114283
- ret.append(".clear();", node.getLastToken(), traversal);
114284
- return ret;
114506
+ const cursor = traversal.traverse(node.findFirstExpression(abaplint.Expressions.SQLSourceSimple)).getCode();
114507
+ return new chunk_1.Chunk().append(`await abap.statements.closeCursor(${cursor});`, node, traversal);
114285
114508
  }
114286
114509
  }
114287
- exports.ClearTranspiler = ClearTranspiler;
114288
- //# sourceMappingURL=clear.js.map
114510
+ exports.CloseCursorTranspiler = CloseCursorTranspiler;
114511
+ //# sourceMappingURL=close_cursor.js.map
114289
114512
 
114290
114513
  /***/ },
114291
114514
 
114292
- /***/ "./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js"
114293
- /*!********************************************************************************!*\
114294
- !*** ./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js ***!
114295
- \********************************************************************************/
114515
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js"
114516
+ /*!*********************************************************************************!*\
114517
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js ***!
114518
+ \*********************************************************************************/
114296
114519
  (__unused_webpack_module, exports, __webpack_require__) {
114297
114520
 
114298
114521
  "use strict";
@@ -114330,35 +114553,17 @@ var __importStar = (this && this.__importStar) || (function () {
114330
114553
  return result;
114331
114554
  };
114332
114555
  })();
114333
- Object.defineProperty(exports, "__esModule", ({ value: true }));
114334
- exports.CloseCursorTranspiler = void 0;
114335
- const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
114336
- const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114337
- class CloseCursorTranspiler {
114338
- transpile(node, traversal) {
114339
- const cursor = traversal.traverse(node.findFirstExpression(abaplint.Expressions.SQLSourceSimple)).getCode();
114340
- return new chunk_1.Chunk().append(`await abap.statements.closeCursor(${cursor});`, node, traversal);
114341
- }
114342
- }
114343
- exports.CloseCursorTranspiler = CloseCursorTranspiler;
114344
- //# sourceMappingURL=close_cursor.js.map
114345
-
114346
- /***/ },
114347
-
114348
- /***/ "./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js"
114349
- /*!*********************************************************************************!*\
114350
- !*** ./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js ***!
114351
- \*********************************************************************************/
114352
- (__unused_webpack_module, exports, __webpack_require__) {
114353
-
114354
- "use strict";
114355
-
114356
114556
  Object.defineProperty(exports, "__esModule", ({ value: true }));
114357
114557
  exports.CloseDatasetTranspiler = void 0;
114558
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
114358
114559
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
114359
114560
  class CloseDatasetTranspiler {
114360
- transpile(_node, _traversal) {
114361
- return new chunk_1.Chunk(`throw new Error("CloseDataset, not supported, transpiler");`);
114561
+ transpile(node, traversal) {
114562
+ const name = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source)).getCode();
114563
+ return new chunk_1.Chunk()
114564
+ .append("await abap.statements.closeDataset(", node, traversal)
114565
+ .appendString(name)
114566
+ .append(");", node.getLastToken(), traversal);
114362
114567
  }
114363
114568
  }
114364
114569
  exports.CloseDatasetTranspiler = CloseDatasetTranspiler;
@@ -114960,7 +115165,7 @@ class CreateDataTranspiler {
114960
115165
  }
114961
115166
  const handle = node.findExpressionAfterToken("HANDLE");
114962
115167
  if (handle) {
114963
- const so = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
115168
+ const so = traversal.traverse(handle);
114964
115169
  const lookup = traversal.lookupClassOrInterface("KERNEL_CREATE_DATA_HANDLE", node.getFirstToken());
114965
115170
  const call = `await ${lookup}.call({handle: ${so.getCode()}, dref: ${target.getCode()}});`;
114966
115171
  return new chunk_1.Chunk().append(`if (${lookup} === undefined) throw new Error("CreateData, kernel class missing");\n${call}`, node, traversal);
@@ -115388,12 +115593,50 @@ exports.DeleteDatabaseTranspiler = DeleteDatabaseTranspiler;
115388
115593
 
115389
115594
  "use strict";
115390
115595
 
115596
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
115597
+ if (k2 === undefined) k2 = k;
115598
+ var desc = Object.getOwnPropertyDescriptor(m, k);
115599
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
115600
+ desc = { enumerable: true, get: function() { return m[k]; } };
115601
+ }
115602
+ Object.defineProperty(o, k2, desc);
115603
+ }) : (function(o, m, k, k2) {
115604
+ if (k2 === undefined) k2 = k;
115605
+ o[k2] = m[k];
115606
+ }));
115607
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
115608
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
115609
+ }) : function(o, v) {
115610
+ o["default"] = v;
115611
+ });
115612
+ var __importStar = (this && this.__importStar) || (function () {
115613
+ var ownKeys = function(o) {
115614
+ ownKeys = Object.getOwnPropertyNames || function (o) {
115615
+ var ar = [];
115616
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
115617
+ return ar;
115618
+ };
115619
+ return ownKeys(o);
115620
+ };
115621
+ return function (mod) {
115622
+ if (mod && mod.__esModule) return mod;
115623
+ var result = {};
115624
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
115625
+ __setModuleDefault(result, mod);
115626
+ return result;
115627
+ };
115628
+ })();
115391
115629
  Object.defineProperty(exports, "__esModule", ({ value: true }));
115392
115630
  exports.DeleteDatasetTranspiler = void 0;
115631
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
115393
115632
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
115394
115633
  class DeleteDatasetTranspiler {
115395
- transpile(_node, _traversal) {
115396
- return new chunk_1.Chunk(`throw new Error("DeleteDataset, not supported, transpiler");`);
115634
+ transpile(node, traversal) {
115635
+ const name = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source)).getCode();
115636
+ return new chunk_1.Chunk()
115637
+ .append("await abap.statements.deleteDataset(", node, traversal)
115638
+ .appendString(name)
115639
+ .append(");", node.getLastToken(), traversal);
115397
115640
  }
115398
115641
  }
115399
115642
  exports.DeleteDatasetTranspiler = DeleteDatasetTranspiler;
@@ -116800,12 +117043,82 @@ exports.FunctionPoolTranspiler = FunctionPoolTranspiler;
116800
117043
 
116801
117044
  "use strict";
116802
117045
 
117046
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
117047
+ if (k2 === undefined) k2 = k;
117048
+ var desc = Object.getOwnPropertyDescriptor(m, k);
117049
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
117050
+ desc = { enumerable: true, get: function() { return m[k]; } };
117051
+ }
117052
+ Object.defineProperty(o, k2, desc);
117053
+ }) : (function(o, m, k, k2) {
117054
+ if (k2 === undefined) k2 = k;
117055
+ o[k2] = m[k];
117056
+ }));
117057
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
117058
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
117059
+ }) : function(o, v) {
117060
+ o["default"] = v;
117061
+ });
117062
+ var __importStar = (this && this.__importStar) || (function () {
117063
+ var ownKeys = function(o) {
117064
+ ownKeys = Object.getOwnPropertyNames || function (o) {
117065
+ var ar = [];
117066
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
117067
+ return ar;
117068
+ };
117069
+ return ownKeys(o);
117070
+ };
117071
+ return function (mod) {
117072
+ if (mod && mod.__esModule) return mod;
117073
+ var result = {};
117074
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
117075
+ __setModuleDefault(result, mod);
117076
+ return result;
117077
+ };
117078
+ })();
116803
117079
  Object.defineProperty(exports, "__esModule", ({ value: true }));
116804
117080
  exports.GenerateSubroutineTranspiler = void 0;
117081
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
116805
117082
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
117083
+ // GENERATE SUBROUTINE POOL cannot be supported, there is no compiler at runtime.
117084
+ // The statement is refused without an exception: sy-subrc = 8 (documented as "other
117085
+ // generation error"), NAME initial, MESSAGE filled, LINE 0 and WORD initial. This is
117086
+ // a refusal of its own, not what a system answers; the other additions are left untouched.
116806
117087
  class GenerateSubroutineTranspiler {
116807
- transpile(_node, _traversal) {
116808
- return new chunk_1.Chunk(`throw new Error("GenerateSubroutine, not supported, transpiler");`);
117088
+ transpile(node, traversal) {
117089
+ const ret = new chunk_1.Chunk();
117090
+ const name = this.findAddition(node, "NAME");
117091
+ if (name) {
117092
+ ret.appendString(traversal.traverse(name).getCode() + ".clear();\n");
117093
+ }
117094
+ const message = this.findAddition(node, "MESSAGE");
117095
+ if (message) {
117096
+ ret.appendString(traversal.traverse(message).getCode() + `.set("GENERATE SUBROUTINE POOL is not supported");\n`);
117097
+ }
117098
+ const line = this.findAddition(node, "LINE");
117099
+ if (line) {
117100
+ ret.appendString(traversal.traverse(line).getCode() + ".set(0);\n");
117101
+ }
117102
+ const word = this.findAddition(node, "WORD");
117103
+ if (word) {
117104
+ ret.appendString(traversal.traverse(word).getCode() + ".clear();\n");
117105
+ }
117106
+ ret.append("abap.builtin.sy.get().subrc.set(8);", node, traversal);
117107
+ return ret;
117108
+ }
117109
+ /** the expression directly after the addition keyword, MESSAGE does not match MESSAGE-ID */
117110
+ findAddition(node, keyword) {
117111
+ const children = node.getChildren();
117112
+ for (let i = 0; i < children.length - 1; i++) {
117113
+ const child = children[i];
117114
+ const next = children[i + 1];
117115
+ if (child instanceof abaplint.Nodes.TokenNode
117116
+ && child.getFirstToken().getStr().toUpperCase() === keyword
117117
+ && next instanceof abaplint.Nodes.ExpressionNode) {
117118
+ return next;
117119
+ }
117120
+ }
117121
+ return undefined;
116809
117122
  }
116810
117123
  }
116811
117124
  exports.GenerateSubroutineTranspiler = GenerateSubroutineTranspiler;
@@ -116886,9 +117199,21 @@ exports.GetBitTranspiler = GetBitTranspiler;
116886
117199
  Object.defineProperty(exports, "__esModule", ({ value: true }));
116887
117200
  exports.GetDatasetTranspiler = void 0;
116888
117201
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
117202
+ const _dataset_1 = __webpack_require__(/*! ./_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/_dataset.js");
116889
117203
  class GetDatasetTranspiler {
116890
- transpile(_node, _traversal) {
116891
- return new chunk_1.Chunk(`throw new Error("GetDataset, not supported, transpiler");`);
117204
+ transpile(node, traversal) {
117205
+ const operands = new _dataset_1.DatasetOperands(node, traversal);
117206
+ const options = [];
117207
+ if (operands.after("POSITION") !== undefined) {
117208
+ options.push("position: " + operands.after("POSITION"));
117209
+ }
117210
+ if (operands.after("ATTRIBUTES") !== undefined) {
117211
+ options.push("attributes: " + operands.after("ATTRIBUTES"));
117212
+ }
117213
+ return new chunk_1.Chunk()
117214
+ .append("await abap.statements.getDataset(", node, traversal)
117215
+ .appendString(operands.first() + ", {" + options.join(", ") + "}")
117216
+ .append(");", node.getLastToken(), traversal);
116892
117217
  }
116893
117218
  }
116894
117219
  exports.GetDatasetTranspiler = GetDatasetTranspiler;
@@ -118014,6 +118339,10 @@ class LoopTranspiler {
118014
118339
  targetNode = assigning;
118015
118340
  target = traversal.traverse(assigning).getCode() + ".assign(" + this.unique + ");";
118016
118341
  }
118342
+ else if (!node.concatTokens().toUpperCase().includes(" TRANSPORTING NO FIELDS") && this.hasHeaderLine(loopSource, traversal)) {
118343
+ // LOOP AT itab. without a target: the row goes into the header line of the table
118344
+ target = source + ".getHeader().set(" + this.unique + ");";
118345
+ }
118017
118346
  }
118018
118347
  const extra = [];
118019
118348
  const fromNode = node.findExpressionAfterToken("FROM");
@@ -118108,6 +118437,14 @@ class LoopTranspiler {
118108
118437
  }
118109
118438
  return ret;
118110
118439
  }
118440
+ hasHeaderLine(loopSource, traversal) {
118441
+ if (loopSource === undefined || /^[\w\/]+$/.test(loopSource.concatTokens()) === false) {
118442
+ return false;
118443
+ }
118444
+ const token = loopSource.getFirstToken();
118445
+ const type = traversal.findCurrentScopeByToken(token)?.findVariable(loopSource.concatTokens())?.getType();
118446
+ return type instanceof abaplint.BasicTypes.TableType && type.isWithHeader();
118447
+ }
118111
118448
  }
118112
118449
  exports.LoopTranspiler = LoopTranspiler;
118113
118450
  //# sourceMappingURL=loop.js.map
@@ -118815,6 +119152,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
118815
119152
  exports.MoveTranspiler = void 0;
118816
119153
  const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
118817
119154
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
119155
+ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js");
118818
119156
  class MoveTranspiler {
118819
119157
  transpile(node, traversal) {
118820
119158
  const sourceExpression = node.findDirectExpression(abaplint.Expressions.Source);
@@ -118834,7 +119172,9 @@ class MoveTranspiler {
118834
119172
  ret.appendString(target + `.set(abap.alphaIn(${tSource.getCode()}, ${target}, ${target}));`);
118835
119173
  return ret;
118836
119174
  }
118837
- let source = traversal.traverse(sourceExpression);
119175
+ let source = this.isInt8Calculation(node, sourceExpression, targetExpressions.length, traversal)
119176
+ ? new source_1.SourceTranspiler(false, true).transpile(sourceExpression, traversal)
119177
+ : traversal.traverse(sourceExpression);
118838
119178
  const second = node.getChildren()[1]?.concatTokens();
118839
119179
  switch (second) {
118840
119180
  case "?=":
@@ -118896,6 +119236,72 @@ class MoveTranspiler {
118896
119236
  }
118897
119237
  return ret;
118898
119238
  }
119239
+ // The calculation type of an arithmetic expression comes from its operands and the target
119240
+ // field, the type with the largest range wins. With operands of type i or int8 it is int8
119241
+ // when the target or an operand is int8: i * i into int8 is exact up to 2^62, and "/"
119242
+ // rounds. The runtime decides by the operands alone and does not know the target, so here
119243
+ // the operands are converted to int8 before the calculation. Only for an i or int8 target
119244
+ // and operands whose type is known to be i or int8, and not for **, which counts as f
119245
+ isInt8Calculation(node, source, targets, traversal) {
119246
+ if (source === undefined
119247
+ || targets !== 1
119248
+ || source.findFirstExpression(abaplint.Expressions.ArithOperator) === undefined) {
119249
+ return false;
119250
+ }
119251
+ const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
119252
+ const target = traversal.determineType(node, scope);
119253
+ const found = { int8: target instanceof abaplint.BasicTypes.Integer8Type };
119254
+ if (found.int8 === false && !(target instanceof abaplint.BasicTypes.IntegerType)) {
119255
+ return false;
119256
+ }
119257
+ return this.integerOperands(source, scope, found) && found.int8;
119258
+ }
119259
+ integerOperands(node, scope, found) {
119260
+ for (const c of node.getChildren()) {
119261
+ if (c instanceof abaplint.Nodes.TokenNode) {
119262
+ if (["(", ")", "-", "+"].includes(c.getFirstToken().getStr()) === false) {
119263
+ return false;
119264
+ }
119265
+ }
119266
+ else if (c.get() instanceof abaplint.Expressions.Source) {
119267
+ if (this.integerOperands(c, scope, found) === false) {
119268
+ return false;
119269
+ }
119270
+ }
119271
+ else if (c.get() instanceof abaplint.Expressions.ArithOperator) {
119272
+ if (["+", "-", "*", "/", "DIV", "MOD"].includes(c.concatTokens().toUpperCase()) === false) {
119273
+ return false;
119274
+ }
119275
+ }
119276
+ else if (c.get() instanceof abaplint.Expressions.Constant) {
119277
+ const integer = c.findDirectExpression(abaplint.Expressions.Integer);
119278
+ if (integer === undefined) {
119279
+ return false;
119280
+ }
119281
+ else if (Math.abs(parseInt(integer.concatTokens().replace(/ /g, ""), 10)) > 2147483647) {
119282
+ // the transpiler makes an int8 of a literal outside the range of i
119283
+ found.int8 = true;
119284
+ }
119285
+ }
119286
+ else if (c.get() instanceof abaplint.Expressions.FieldChain) {
119287
+ const children = c.getChildren();
119288
+ if (children.length !== 1) {
119289
+ return false;
119290
+ }
119291
+ const type = scope?.findVariable(children[0].concatTokens())?.getType();
119292
+ if (!(type instanceof abaplint.BasicTypes.IntegerType) && !(type instanceof abaplint.BasicTypes.Integer8Type)) {
119293
+ return false;
119294
+ }
119295
+ if (type instanceof abaplint.BasicTypes.Integer8Type) {
119296
+ found.int8 = true;
119297
+ }
119298
+ }
119299
+ else {
119300
+ return false;
119301
+ }
119302
+ }
119303
+ return true;
119304
+ }
118899
119305
  }
118900
119306
  exports.MoveTranspiler = MoveTranspiler;
118901
119307
  //# sourceMappingURL=move.js.map
@@ -119144,9 +119550,39 @@ exports.OpenCursorTranspiler = OpenCursorTranspiler;
119144
119550
  Object.defineProperty(exports, "__esModule", ({ value: true }));
119145
119551
  exports.OpenDatasetTranspiler = void 0;
119146
119552
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
119553
+ const _dataset_1 = __webpack_require__(/*! ./_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/_dataset.js");
119147
119554
  class OpenDatasetTranspiler {
119148
- transpile(_node, _traversal) {
119149
- return new chunk_1.Chunk(`throw new Error("OpenDataset, not supported, transpiler");`);
119555
+ transpile(node, traversal) {
119556
+ const operands = new _dataset_1.DatasetOperands(node, traversal);
119557
+ const options = [];
119558
+ const mode = ["INPUT", "OUTPUT", "APPENDING", "UPDATE"].find(m => operands.has("FOR " + m)) ?? "INPUT";
119559
+ options.push(`mode: "${mode}"`);
119560
+ options.push(`binary: ${operands.has("BINARY MODE")}`);
119561
+ const encoding = ["DEFAULT", "UTF-8", "NON-UNICODE"].find(e => operands.has("ENCODING " + e));
119562
+ if (encoding !== undefined) {
119563
+ options.push(`encoding: "${encoding}"`);
119564
+ }
119565
+ if (operands.has("IN LEGACY")) {
119566
+ options.push("legacy: true");
119567
+ }
119568
+ if (operands.after("MESSAGE") !== undefined) {
119569
+ options.push("message: " + operands.after("MESSAGE"));
119570
+ }
119571
+ if (operands.after("AT POSITION") !== undefined) {
119572
+ options.push("position: " + operands.after("AT POSITION"));
119573
+ }
119574
+ // accepted by the syntax, not implemented by the runtime: it refuses them
119575
+ // by name rather than ignoring them
119576
+ const unsupported = ["CODE PAGE", "TYPE", "FILTER", "REPLACEMENT CHARACTER", "WITH BYTE-ORDER MARK", "SKIPPING BYTE-ORDER MARK",
119577
+ "WITH SMART LINEFEED", "WITH NATIVE LINEFEED", "WITH UNIX LINEFEED", "WITH WINDOWS LINEFEED", "IGNORING CONVERSION ERRORS"]
119578
+ .filter(u => operands.has(u) || operands.after(u) !== undefined);
119579
+ if (unsupported.length > 0) {
119580
+ options.push("unsupported: " + JSON.stringify(unsupported));
119581
+ }
119582
+ return new chunk_1.Chunk()
119583
+ .append("await abap.statements.openDataset(", node, traversal)
119584
+ .appendString(operands.first() + ", {" + options.join(", ") + "}")
119585
+ .append(");", node.getLastToken(), traversal);
119150
119586
  }
119151
119587
  }
119152
119588
  exports.OpenDatasetTranspiler = OpenDatasetTranspiler;
@@ -119224,12 +119660,78 @@ exports.OverlayTranspiler = OverlayTranspiler;
119224
119660
 
119225
119661
  "use strict";
119226
119662
 
119663
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
119664
+ if (k2 === undefined) k2 = k;
119665
+ var desc = Object.getOwnPropertyDescriptor(m, k);
119666
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
119667
+ desc = { enumerable: true, get: function() { return m[k]; } };
119668
+ }
119669
+ Object.defineProperty(o, k2, desc);
119670
+ }) : (function(o, m, k, k2) {
119671
+ if (k2 === undefined) k2 = k;
119672
+ o[k2] = m[k];
119673
+ }));
119674
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
119675
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
119676
+ }) : function(o, v) {
119677
+ o["default"] = v;
119678
+ });
119679
+ var __importStar = (this && this.__importStar) || (function () {
119680
+ var ownKeys = function(o) {
119681
+ ownKeys = Object.getOwnPropertyNames || function (o) {
119682
+ var ar = [];
119683
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
119684
+ return ar;
119685
+ };
119686
+ return ownKeys(o);
119687
+ };
119688
+ return function (mod) {
119689
+ if (mod && mod.__esModule) return mod;
119690
+ var result = {};
119691
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
119692
+ __setModuleDefault(result, mod);
119693
+ return result;
119694
+ };
119695
+ })();
119227
119696
  Object.defineProperty(exports, "__esModule", ({ value: true }));
119228
119697
  exports.ParameterTranspiler = void 0;
119698
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
119229
119699
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
119700
+ const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
119701
+ const _selection_1 = __webpack_require__(/*! ./_selection */ "./node_modules/@abaplint/transpiler/build/src/statements/_selection.js");
119230
119702
  class ParameterTranspiler {
119231
- transpile(_node, _traversal) {
119232
- return new chunk_1.Chunk(`throw new Error("Parameter, not supported, transpiler");`);
119703
+ transpile(node, traversal) {
119704
+ const variable = _selection_1.SelectionDefault.variable(node, traversal);
119705
+ // abaplint types "TYPE c LENGTH 3" and "TYPE p ... DECIMALS 2" of a parameter
119706
+ // without the length and the decimals, a value would be cut silently
119707
+ const tokens = node.getTokens().map(t => t.getStr().toUpperCase());
119708
+ const sized = tokens.some((t, i) => (t === "LENGTH" && tokens[i - 1] !== "VISIBLE") || t === "DECIMALS");
119709
+ if (variable === undefined || sized === true) {
119710
+ return new chunk_1.Chunk(`throw new Error("Parameter, not supported, transpiler");`);
119711
+ }
119712
+ const { name, type } = variable;
119713
+ const ret = new chunk_1.Chunk().appendString("let " + name + " = " + transpile_types_1.TranspileTypes.toType(type) + ";");
119714
+ const operand = _selection_1.SelectionDefault.after(node, "DEFAULT");
119715
+ if (operand) {
119716
+ ret.appendString(_selection_1.SelectionDefault.set(node, name, type, operand, traversal));
119717
+ }
119718
+ else if (this.isFirstOfUnsetRadioGroup(node, traversal)) {
119719
+ // a radio button group without DEFAULT 'X' starts with its first button chosen
119720
+ ret.appendString("\n" + name + ".set('X');");
119721
+ }
119722
+ return ret;
119723
+ }
119724
+ isFirstOfUnsetRadioGroup(node, traversal) {
119725
+ const group = node.findDirectExpression(abaplint.Expressions.RadioGroupName)?.concatTokens().toUpperCase();
119726
+ if (group === undefined) {
119727
+ return false;
119728
+ }
119729
+ const members = traversal.getFile().getStatements().filter(s => s.get() instanceof abaplint.Statements.Parameter
119730
+ && s.findDirectExpression(abaplint.Expressions.RadioGroupName)?.concatTokens().toUpperCase() === group);
119731
+ if (members.some(m => _selection_1.SelectionDefault.after(m, "DEFAULT") !== undefined)) {
119732
+ return false;
119733
+ }
119734
+ return members[0].getStart().equals(node.getStart());
119233
119735
  }
119234
119736
  }
119235
119737
  exports.ParameterTranspiler = ParameterTranspiler;
@@ -119290,16 +119792,18 @@ class PerformTranspiler {
119290
119792
  return new chunk_1.Chunk(`throw new Error("PerformTranspiler FormName not found");`);
119291
119793
  }
119292
119794
  else if (node.concatTokens().toUpperCase().includes(" IN PROGRAM ")) {
119293
- // todo: throw exception if not found?
119294
119795
  const expression = node.findExpressionAfterToken("PROGRAM");
119295
119796
  let ref = "";
119797
+ let program = "";
119296
119798
  if (expression?.get() instanceof abaplint.Expressions.Dynamic) {
119297
119799
  const name = expression.getChildren()[1].concatTokens() + ".get().trimEnd()";
119298
119800
  ref = `abap.Forms['PROG-' + ${name} + '-${formName.concatTokens().toUpperCase()}']`;
119801
+ program = `'PROG-' + ${name} + '-'`;
119299
119802
  }
119300
119803
  else {
119301
119804
  const progName = expression?.concatTokens().toUpperCase();
119302
119805
  ref = `abap.Forms['PROG-${progName}-${formName.concatTokens().toUpperCase()}']`;
119806
+ program = `'PROG-${progName}-'`;
119303
119807
  }
119304
119808
  const params = [];
119305
119809
  // hacky hack
@@ -119311,6 +119815,16 @@ class PerformTranspiler {
119311
119815
  if (node.concatTokens().toUpperCase().includes(" IF FOUND")) {
119312
119816
  call = `if (${ref} !== undefined) { ${call} }`;
119313
119817
  }
119818
+ else {
119819
+ // the form is missing from a program whose forms are registered: CX_SY_DYN_CALL_ILLEGAL_FORM,
119820
+ // no form of the program is registered: CX_SY_PROGRAM_NOT_FOUND
119821
+ const raise = (name) => {
119822
+ const cls = traversal.lookupClassOrInterface(`'${name}'`, node.getFirstToken(), true);
119823
+ return `if (${cls} === undefined) { throw "${name} not found"; } else { throw await new ${cls}().constructor_(); }`;
119824
+ };
119825
+ const loaded = `Object.keys(abap.Forms).some(k => k.startsWith(${program}))`;
119826
+ call = `if (${ref} === undefined) { if (${loaded}) { ${raise("CX_SY_DYN_CALL_ILLEGAL_FORM")} } else { ${raise("CX_SY_PROGRAM_NOT_FOUND")} } }\n` + call;
119827
+ }
119314
119828
  return new chunk_1.Chunk(call);
119315
119829
  }
119316
119830
  else {
@@ -119673,9 +120187,23 @@ exports.RangesTranspiler = RangesTranspiler;
119673
120187
  Object.defineProperty(exports, "__esModule", ({ value: true }));
119674
120188
  exports.ReadDatasetTranspiler = void 0;
119675
120189
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
120190
+ const _dataset_1 = __webpack_require__(/*! ./_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/_dataset.js");
119676
120191
  class ReadDatasetTranspiler {
119677
- transpile(_node, _traversal) {
119678
- return new chunk_1.Chunk(`throw new Error("ReadDataset, not supported, transpiler");`);
120192
+ transpile(node, traversal) {
120193
+ const operands = new _dataset_1.DatasetOperands(node, traversal);
120194
+ const options = [];
120195
+ if (operands.after("MAXIMUM LENGTH") !== undefined) {
120196
+ options.push("maximumLength: " + operands.after("MAXIMUM LENGTH"));
120197
+ }
120198
+ // the obsolete LENGTH is ACTUAL LENGTH
120199
+ const actual = operands.after("ACTUAL LENGTH") ?? operands.after("LENGTH", ["MAXIMUM", "ACTUAL"]);
120200
+ if (actual !== undefined) {
120201
+ options.push("actualLength: " + actual);
120202
+ }
120203
+ return new chunk_1.Chunk()
120204
+ .append("await abap.statements.readDataset(", node, traversal)
120205
+ .appendString(operands.first() + ", " + operands.after("INTO") + ", {" + options.join(", ") + "}")
120206
+ .append(");", node.getLastToken(), traversal);
119679
120207
  }
119680
120208
  }
119681
120209
  exports.ReadDatasetTranspiler = ReadDatasetTranspiler;
@@ -120557,6 +121085,12 @@ class SelectTranspiler {
120557
121085
  if (groupBy) {
120558
121086
  select += new sql_group_by_1.SQLGroupByTranspiler().transpile(groupBy, traversal).getCode() + " ";
120559
121087
  }
121088
+ const having = node.findDirectExpression(abaplint.Expressions.Select)
121089
+ ?.findDirectExpression(abaplint.Expressions.SQLHaving);
121090
+ const havingCond = having?.findFirstExpression(abaplint.Expressions.SQLCond);
121091
+ if (havingCond) {
121092
+ select += "HAVING " + new expressions_1.SQLCondTranspiler().transpile(havingCond, traversal, table).getCode() + " ";
121093
+ }
120560
121094
  const upTo = node.findFirstExpression(abaplint.Expressions.SQLUpTo);
120561
121095
  if (upTo) {
120562
121096
  const s = upTo.findFirstExpression(abaplint.Expressions.SimpleSource3);
@@ -120623,26 +121157,85 @@ class SelectTranspiler {
120623
121157
  const faeTranspiled = new expressions_1.SQLSourceTranspiler().transpile(fn, traversal).getCode();
120624
121158
  // ABAP semantics: with an empty driving table the whole WHERE condition is ignored
120625
121159
  const selectEmpty = select.replace(whereClause, "");
120626
- select = select.replace(new RegExp(" " + escapeRegExp(faeTranspiled), "g"), " " + unique);
120627
- select = select.replace(unique + ".get().table_line.get()", unique + ".get()"); // there can be only one?
121160
+ const bindRow = (text) => text
121161
+ .replace(new RegExp(" " + escapeRegExp(faeTranspiled), "g"), " " + unique)
121162
+ .replace(unique + ".get().table_line.get()", unique + ".get()"); // there can be only one?
121163
+ select = bindRow(select);
121164
+ const where = bindRow(whereClause);
120628
121165
  // FOR ALL ENTRIES removes duplicate rows from the result: duplicates of
120629
121166
  // the selected columns, so de-duplicate by the target's components. The
120630
121167
  // DB key alone is wrong for projections (INTO CORRESPONDING FIELDS
120631
121168
  // without the key fields crashed on the missing component names)
120632
121169
  const by = `Object.keys(${target}.getRowType().get())`;
121170
+ // generated code is not indented, Chunk.runIndentationLogic indents by brace depth
121171
+ const dedup = `if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
121172
+ abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
121173
+ await abap.statements.deleteInternal(${target}, {adjacent: true, allFields: true});
121174
+ }`;
121175
+ const at = where.startsWith("WHERE ") ? select.indexOf(where) : -1;
121176
+ // UP TO with ORDER BY keeps the first n rows in that order; the blocks
121177
+ // trim after the de-duplicating sort, so that pair stays row by row
121178
+ if (concat.startsWith("SELECT SINGLE ") || at < 0 || (upTo && orderBy)) {
121179
+ const code = `if (${faeTranspiled}.array().length === 0) {
121180
+ await abap.statements.select(${target}, {select: "${selectEmpty.trim()}"${extra}});
121181
+ } else {
121182
+ const ${unique2} = ${faeTranspiled}.array();
121183
+ ${target}.clear();
121184
+ for await (const ${unique} of ${unique2}) {
121185
+ await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
121186
+ }
121187
+ ${dedup}
121188
+ abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
121189
+ }`;
121190
+ return new chunk_1.Chunk().append(code, node, traversal);
121191
+ }
121192
+ // One SELECT per block of driving rows, similar to the kernel's blocking
121193
+ // of FOR ALL ENTRIES (rsdb/max_blocking_factor): the condition of each row in
121194
+ // parentheses, joined with OR. Not one SELECT per row. UP TO n ROWS
121195
+ // counts the whole de-duplicated result, not each block (measured on
121196
+ // a 7.5x system: two driving rows and UP TO 3 give 3 rows).
121197
+ let tail = select.substring(at + where.length);
121198
+ let upToCode = "0";
121199
+ if (upTo) {
121200
+ const s = upTo.findFirstExpression(abaplint.Expressions.SimpleSource3);
121201
+ if (s) {
121202
+ const n = new expressions_1.SourceTranspiler(true).transpile(s, traversal).getCode();
121203
+ tail = tail.replace(`UP TO " + ${n} + " ROWS `, "");
121204
+ upToCode = `parseInt(${n}, 10)`;
121205
+ }
121206
+ else {
121207
+ tail = tail.replace(upTo.concatTokens() + " ", "");
121208
+ upToCode = String(parseInt(upTo.findFirstExpression(abaplint.Expressions.Integer)?.concatTokens() ?? "0", 10));
121209
+ }
121210
+ }
121211
+ const head = select.substring(0, at);
121212
+ const condition = where.substring("WHERE ".length).trimEnd();
121213
+ const unique3 = unique_identifier_1.UniqueIdentifier.get();
121214
+ const unique4 = unique_identifier_1.UniqueIdentifier.get();
120633
121215
  const code = `if (${faeTranspiled}.array().length === 0) {
120634
- await abap.statements.select(${target}, {select: "${selectEmpty.trim()}"${extra}});
121216
+ await abap.statements.select(${target}, {select: "${selectEmpty.trim()}"${extra}});
120635
121217
  } else {
120636
- const ${unique2} = ${faeTranspiled}.array();
120637
- ${target}.clear();
120638
- for await (const ${unique} of ${unique2}) {
120639
- await abap.statements.select(${target}, {select: "${select.trim()}"${extra}}, {appending: true});
120640
- }
120641
- if (!(${target} instanceof abap.types.HashedTable) && ${target}.getOptions()?.primaryKey?.type !== "SORTED") {
120642
- abap.statements.sort(${target}, {by: ${by}.map(k => { return {component: k}; })});
120643
- await abap.statements.deleteInternal(${target}, {adjacent: true, allFields: true});
120644
- }
120645
- abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
121218
+ const ${unique2} = ${faeTranspiled}.array();
121219
+ ${target}.clear();
121220
+ const ${unique3} = (${unique}) => "(${condition})";
121221
+ for (let ${unique4} = 0; ${unique4} < ${unique2}.length; ${unique4} += 50) {
121222
+ const ${unique4}where = ${unique2}.slice(${unique4}, ${unique4} + 50).map(${unique3}).join(" OR ");
121223
+ await abap.statements.select(${target}, {select: "${head}WHERE " + ${unique4}where + " ${tail.trim()}"${extra}}, {appending: true});
121224
+ }
121225
+ ${dedup}
121226
+ const ${unique4}max = ${upToCode};
121227
+ if (${unique4}max > 0 && ${target}.getArrayLength() > ${unique4}max) {
121228
+ if (${target} instanceof abap.types.HashedTable) {
121229
+ for (const ${unique4}row of ${target}.array().slice(${unique4}max)) {
121230
+ await abap.statements.deleteInternal(${target}, {fromValue: ${unique4}row});
121231
+ }
121232
+ } else {
121233
+ while (${target}.getArrayLength() > ${unique4}max) {
121234
+ ${target}.deleteIndex(${target}.getArrayLength() - 1);
121235
+ }
121236
+ }
121237
+ }
121238
+ abap.builtin.sy.get().dbcnt.set(${target}.getArrayLength());
120646
121239
  }`;
120647
121240
  return new chunk_1.Chunk().append(code, node, traversal);
120648
121241
  }
@@ -120703,12 +121296,73 @@ exports.SelectTranspiler = SelectTranspiler;
120703
121296
 
120704
121297
  "use strict";
120705
121298
 
121299
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
121300
+ if (k2 === undefined) k2 = k;
121301
+ var desc = Object.getOwnPropertyDescriptor(m, k);
121302
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
121303
+ desc = { enumerable: true, get: function() { return m[k]; } };
121304
+ }
121305
+ Object.defineProperty(o, k2, desc);
121306
+ }) : (function(o, m, k, k2) {
121307
+ if (k2 === undefined) k2 = k;
121308
+ o[k2] = m[k];
121309
+ }));
121310
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
121311
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
121312
+ }) : function(o, v) {
121313
+ o["default"] = v;
121314
+ });
121315
+ var __importStar = (this && this.__importStar) || (function () {
121316
+ var ownKeys = function(o) {
121317
+ ownKeys = Object.getOwnPropertyNames || function (o) {
121318
+ var ar = [];
121319
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
121320
+ return ar;
121321
+ };
121322
+ return ownKeys(o);
121323
+ };
121324
+ return function (mod) {
121325
+ if (mod && mod.__esModule) return mod;
121326
+ var result = {};
121327
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
121328
+ __setModuleDefault(result, mod);
121329
+ return result;
121330
+ };
121331
+ })();
120706
121332
  Object.defineProperty(exports, "__esModule", ({ value: true }));
120707
121333
  exports.SelectOptionTranspiler = void 0;
121334
+ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
120708
121335
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
121336
+ const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
121337
+ const _selection_1 = __webpack_require__(/*! ./_selection */ "./node_modules/@abaplint/transpiler/build/src/statements/_selection.js");
120709
121338
  class SelectOptionTranspiler {
120710
- transpile(_node, _traversal) {
120711
- return new chunk_1.Chunk(`throw new Error("SelectOption, not supported, transpiler");`);
121339
+ transpile(node, traversal) {
121340
+ const variable = _selection_1.SelectionDefault.variable(node, traversal);
121341
+ const row = variable?.type instanceof abaplint.BasicTypes.TableType ? variable.type.getRowType() : undefined;
121342
+ const lowType = row instanceof abaplint.BasicTypes.StructureType ? row.getComponentByName("LOW") : undefined;
121343
+ if (variable === undefined || lowType === undefined) {
121344
+ // eg. FOR (dynamic)
121345
+ return new chunk_1.Chunk(`throw new Error("SelectOption, not supported, transpiler");`);
121346
+ }
121347
+ const { name, type } = variable;
121348
+ const ret = new chunk_1.Chunk().appendString("let " + name + " = " + transpile_types_1.TranspileTypes.toType(type) + ";");
121349
+ // DEFAULT low [TO high] [OPTION o] [SIGN s] is the first row of the table and
121350
+ // stays in the header line: I EQ, or I BT with TO, unless OPTION or SIGN say otherwise
121351
+ const low = _selection_1.SelectionDefault.after(node, "DEFAULT");
121352
+ if (low === undefined) {
121353
+ return ret;
121354
+ }
121355
+ const high = _selection_1.SelectionDefault.after(node, "TO");
121356
+ const option = _selection_1.SelectionDefault.after(node, "OPTION")?.concatTokens().toUpperCase() ?? (high ? "BT" : "EQ");
121357
+ const sign = _selection_1.SelectionDefault.after(node, "SIGN")?.concatTokens().toUpperCase() ?? "I";
121358
+ ret.appendString("\n" + name + ".get().sign.set('" + sign + "');");
121359
+ ret.appendString("\n" + name + ".get().option.set('" + option + "');");
121360
+ ret.appendString(_selection_1.SelectionDefault.set(node, name + ".get().low", lowType, low, traversal));
121361
+ if (high) {
121362
+ ret.appendString(_selection_1.SelectionDefault.set(node, name + ".get().high", lowType, high, traversal));
121363
+ }
121364
+ ret.appendString("\nabap.statements.append({source: " + name + "});");
121365
+ return ret;
120712
121366
  }
120713
121367
  }
120714
121368
  exports.SelectOptionTranspiler = SelectOptionTranspiler;
@@ -120854,9 +121508,17 @@ exports.SetCursorTranspiler = SetCursorTranspiler;
120854
121508
  Object.defineProperty(exports, "__esModule", ({ value: true }));
120855
121509
  exports.SetDatasetTranspiler = void 0;
120856
121510
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
121511
+ const _dataset_1 = __webpack_require__(/*! ./_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/_dataset.js");
120857
121512
  class SetDatasetTranspiler {
120858
- transpile(_node, _traversal) {
120859
- return new chunk_1.Chunk(`throw new Error("SetDataset, not supported, transpiler");`);
121513
+ transpile(node, traversal) {
121514
+ const operands = new _dataset_1.DatasetOperands(node, traversal);
121515
+ const option = operands.after("POSITION") !== undefined
121516
+ ? "position: " + operands.after("POSITION")
121517
+ : "endOfFile: true";
121518
+ return new chunk_1.Chunk()
121519
+ .append("await abap.statements.setDataset(", node, traversal)
121520
+ .appendString(operands.first() + ", {" + option + "}")
121521
+ .append(");", node.getLastToken(), traversal);
120860
121522
  }
120861
121523
  }
120862
121524
  exports.SetDatasetTranspiler = SetDatasetTranspiler;
@@ -121351,7 +122013,8 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
121351
122013
  class SortTranspiler {
121352
122014
  transpile(node, traversal) {
121353
122015
  const concat = node.concatTokens().toUpperCase();
121354
- const components = node.findDirectExpressions(abaplint.Expressions.ComponentChain);
122016
+ const components = node.getChildren().filter(c => c instanceof abaplint.Nodes.ExpressionNode
122017
+ && (c.get() instanceof abaplint.Expressions.ComponentChain || this.isDynamicName(c, traversal)));
121355
122018
  const options = [];
121356
122019
  if (concat.includes(" BY ") === false) {
121357
122020
  const descending = node.findDirectTokenByText("DESCENDING") !== undefined;
@@ -121363,12 +122026,14 @@ class SortTranspiler {
121363
122026
  const by = [];
121364
122027
  for (const c of components) {
121365
122028
  const next = this.findNextText(c, node);
121366
- const concat = expressions_1.ComponentChainTranspiler.concat(c, traversal);
122029
+ const component = c.get() instanceof abaplint.Expressions.Dynamic
122030
+ ? this.dynamicName(c, traversal)
122031
+ : `"${expressions_1.ComponentChainTranspiler.concat(c, traversal)}"`;
121367
122032
  if (next === "DESCENDING") {
121368
- by.push(`{component: "${concat}", descending: true}`);
122033
+ by.push(`{component: ${component}, descending: true}`);
121369
122034
  }
121370
122035
  else {
121371
- by.push(`{component: "${concat}"}`);
122036
+ by.push(`{component: ${component}}`);
121372
122037
  }
121373
122038
  }
121374
122039
  options.push(`by: [${by.join(",")}]`);
@@ -121376,6 +122041,32 @@ class SortTranspiler {
121376
122041
  const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();
121377
122042
  return new chunk_1.Chunk().append("abap.statements.sort(" + target + ",{" + options.join(",") + "});", node, traversal);
121378
122043
  }
122044
+ // "BY (name)" with the component name in a literal or a character-like field; a sort order table
122045
+ // (abap_sortorder_tab) is not handled here
122046
+ isDynamicName(c, traversal) {
122047
+ if (!(c.get() instanceof abaplint.Expressions.Dynamic)) {
122048
+ return false;
122049
+ }
122050
+ if (c.findFirstExpression(abaplint.Expressions.ConstantString)) {
122051
+ return true;
122052
+ }
122053
+ const field = c.findFirstExpression(abaplint.Expressions.FieldChain);
122054
+ if (field === undefined) {
122055
+ return false;
122056
+ }
122057
+ const token = field.getFirstToken();
122058
+ const type = traversal.findCurrentScopeByToken(token)?.findVariable(token.getStr())?.getType();
122059
+ return !(type instanceof abaplint.BasicTypes.TableType);
122060
+ }
122061
+ dynamicName(c, traversal) {
122062
+ const constant = c.findFirstExpression(abaplint.Expressions.ConstantString);
122063
+ if (constant) {
122064
+ const str = constant.getFirstToken().getStr();
122065
+ return JSON.stringify(str.substring(1, str.length - 1).toLowerCase().trimEnd());
122066
+ }
122067
+ const field = c.findFirstExpression(abaplint.Expressions.FieldChain);
122068
+ return new expressions_1.FieldChainTranspiler(true).transpile(field, traversal).getCode() + ".toLowerCase().trimEnd()";
122069
+ }
121379
122070
  findNextText(c, parent) {
121380
122071
  const children = parent.getChildren();
121381
122072
  for (let i = 0; i < children.length; i++) {
@@ -121800,9 +122491,21 @@ exports.TopOfPageTranspiler = TopOfPageTranspiler;
121800
122491
  Object.defineProperty(exports, "__esModule", ({ value: true }));
121801
122492
  exports.TransferTranspiler = void 0;
121802
122493
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
122494
+ const _dataset_1 = __webpack_require__(/*! ./_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/_dataset.js");
121803
122495
  class TransferTranspiler {
121804
- transpile(_node, _traversal) {
121805
- return new chunk_1.Chunk(`throw new Error("Transfer, not supported, transpiler");`);
122496
+ transpile(node, traversal) {
122497
+ const operands = new _dataset_1.DatasetOperands(node, traversal);
122498
+ const options = [];
122499
+ if (operands.after("LENGTH", ["MAXIMUM", "ACTUAL"]) !== undefined) {
122500
+ options.push("length: " + operands.after("LENGTH", ["MAXIMUM", "ACTUAL"]));
122501
+ }
122502
+ if (operands.has("NO END OF LINE")) {
122503
+ options.push("noEndOfLine: true");
122504
+ }
122505
+ return new chunk_1.Chunk()
122506
+ .append("await abap.statements.transfer(", node, traversal)
122507
+ .appendString(operands.first() + ", " + operands.after("TO") + ", {" + options.join(", ") + "}")
122508
+ .append(");", node.getLastToken(), traversal);
121806
122509
  }
121807
122510
  }
121808
122511
  exports.TransferTranspiler = TransferTranspiler;
@@ -123009,17 +123712,18 @@ class ClassDefinitionTranspiler {
123009
123712
  }
123010
123713
  else {
123011
123714
  // its an abstract class with only abstract methods
123715
+ // not indented, Chunk.runIndentationLogic indents by brace depth
123012
123716
  return new chunk_1.Chunk(`
123013
123717
  class ${className?.toLowerCase()} {
123014
- static INTERNAL_TYPE = 'CLAS';
123015
- static IMPLEMENTED_INTERFACES = [];
123016
- static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
123017
- static ATTRIBUTES = {};
123018
- async constructor_() {
123019
- this.me = new abap.types.ABAPObject();
123020
- this.me.set(this);
123021
- return this;
123022
- }
123718
+ static INTERNAL_TYPE = 'CLAS';
123719
+ static IMPLEMENTED_INTERFACES = [];
123720
+ static INTERNAL_NAME = 'ABSTRACT_CLASS_INTERNAL_NAME';
123721
+ static ATTRIBUTES = {};
123722
+ async constructor_() {
123723
+ this.me = new abap.types.ABAPObject();
123724
+ this.me.set(this);
123725
+ return this;
123726
+ }
123023
123727
  }`);
123024
123728
  }
123025
123729
  }