@abaplint/transpiler-cli 2.14.10 → 2.14.12

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 +1862 -86
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -1619,11 +1619,40 @@ exports.LexerStream = LexerStream;
1619
1619
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1620
1620
  exports.AbstractToken = void 0;
1621
1621
  const position_1 = __webpack_require__(/*! ../../../position */ "./node_modules/@abaplint/core/build/src/position.js");
1622
- class AbstractToken {
1622
+ const virtual_position_1 = __webpack_require__(/*! ../../../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
1623
+ // token strings repeat a lot across files (keywords, common names, upper cased copies), share them.
1624
+ // Longer strings are typically comments or text literals, not worth sharing
1625
+ const INTERN_MAX_LENGTH = 30;
1626
+ // bound the table, it lives for the lifetime of the process
1627
+ const INTERN_MAX_ENTRIES = 100000;
1628
+ // V8 represents substrings of this length or longer as slices that reference the full source,
1629
+ // these are flattened before being stored, so the table does not keep removed files alive
1630
+ const SLICED_MIN_LENGTH = 13;
1631
+ let interned = new Map();
1632
+ function intern(str) {
1633
+ if (str.length > INTERN_MAX_LENGTH) {
1634
+ return str;
1635
+ }
1636
+ const found = interned.get(str);
1637
+ if (found !== undefined) {
1638
+ return found;
1639
+ }
1640
+ if (interned.size >= INTERN_MAX_ENTRIES) {
1641
+ interned = new Map();
1642
+ }
1643
+ const copy = str.length >= SLICED_MIN_LENGTH ? str.split("").join("") : str;
1644
+ interned.set(copy, copy);
1645
+ return copy;
1646
+ }
1647
+ // the token is its own start position, saves a separate Position object per token
1648
+ class AbstractToken extends position_1.Position {
1623
1649
  constructor(start, str) {
1624
- this.start = start;
1625
- this.str = str;
1626
- this.strUpper = str.toUpperCase();
1650
+ super(start.getRow(), start.getCol());
1651
+ this.str = intern(str);
1652
+ this.strUpper = intern(str.toUpperCase());
1653
+ if (start instanceof virtual_position_1.VirtualPosition) {
1654
+ this.virtual = start;
1655
+ }
1627
1656
  }
1628
1657
  // special function, for debugging purposes, see https://github.com/abaplint/abaplint/pull/3137
1629
1658
  [Symbol.for("debug.description")]() {
@@ -1635,17 +1664,12 @@ class AbstractToken {
1635
1664
  getUpperStr() {
1636
1665
  return this.strUpper;
1637
1666
  }
1638
- getRow() {
1639
- return this.start.getRow();
1640
- }
1641
- getCol() {
1642
- return this.start.getCol();
1643
- }
1644
1667
  getStart() {
1645
- return this.start;
1668
+ var _a;
1669
+ return (_a = this.virtual) !== null && _a !== void 0 ? _a : this;
1646
1670
  }
1647
1671
  getEnd() {
1648
- return new position_1.Position(this.start.getRow(), this.start.getCol() + this.str.length);
1672
+ return new position_1.Position(this.getRow(), this.getCol() + this.str.length);
1649
1673
  }
1650
1674
  }
1651
1675
  exports.AbstractToken = AbstractToken;
@@ -12333,23 +12357,25 @@ class Result {
12333
12357
  return this.tokens[this.tokenIndex + offset];
12334
12358
  }
12335
12359
  shift(node) {
12336
- return Result.fromChain(this.tokens, this.tokenIndex + 1, { node, previous: this.nodes }, this.nodeCount + 1);
12360
+ return Result.fromChain(this.tokens, this.tokenIndex + 1, { node, tokenCount: 1, previous: this.nodes }, this.nodeCount + 1);
12337
12361
  }
12338
12362
  wrapConsumed(consumedTokens, node) {
12339
12363
  let current = this.nodes;
12340
12364
  let currentCount = this.nodeCount;
12365
+ let tokenCount = 0;
12341
12366
  const children = [];
12342
12367
  while (consumedTokens > 0) {
12343
12368
  if (current === undefined) {
12344
12369
  break;
12345
12370
  }
12346
12371
  children.push(current.node);
12347
- consumedTokens = consumedTokens - current.node.countTokens();
12372
+ consumedTokens = consumedTokens - current.tokenCount;
12373
+ tokenCount = tokenCount + current.tokenCount;
12348
12374
  current = current.previous;
12349
12375
  currentCount--;
12350
12376
  }
12351
12377
  node.setChildren(children.reverse());
12352
- this.nodes = { node, previous: current };
12378
+ this.nodes = { node, tokenCount, previous: current };
12353
12379
  this.nodeCount = currentCount + 1;
12354
12380
  return this;
12355
12381
  }
@@ -12378,7 +12404,7 @@ class Result {
12378
12404
  this.nodes = undefined;
12379
12405
  this.nodeCount = 0;
12380
12406
  for (const node of n) {
12381
- this.nodes = { node, previous: this.nodes };
12407
+ this.nodes = { node, tokenCount: node.countTokens(), previous: this.nodes };
12382
12408
  this.nodeCount++;
12383
12409
  }
12384
12410
  }
@@ -20468,11 +20494,15 @@ class Submit {
20468
20494
  const datasetExpiration = (0, combi_1.seq)("DATASET EXPIRATION", expressions_1.Source);
20469
20495
  const coverText = (0, combi_1.seq)("COVER TEXT", expressions_1.Source);
20470
20496
  const listName = (0, combi_1.seq)("LIST NAME", expressions_1.Source);
20497
+ const listDataset = (0, combi_1.seq)("LIST DATASET", expressions_1.Source);
20498
+ const listAuthority = (0, combi_1.seq)("LIST AUTHORITY", expressions_1.Source);
20499
+ const coverPage = (0, combi_1.seq)("COVER PAGE", expressions_1.Source);
20500
+ const department = (0, combi_1.seq)("DEPARTMENT", expressions_1.Source);
20471
20501
  const keep = (0, combi_1.seq)("KEEP IN SPOOL", expressions_1.Source);
20472
20502
  const imm = (0, combi_1.seq)("IMMEDIATELY", expressions_1.Source);
20473
20503
  const dest = (0, combi_1.seq)("DESTINATION", expressions_1.Source);
20474
20504
  const language = (0, combi_1.seq)("LANGUAGE", expressions_1.Source);
20475
- const perm = (0, combi_1.per)((0, combi_1.plusPrio)(awith), selectionTable, (0, combi_1.plusPrio)(awith), (0, combi_1.plusPrio)(awith), spool, lineSize, lineCount, archive, archiveMode, receiver, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
20505
+ const perm = (0, combi_1.per)((0, combi_1.plusPrio)(awith), selectionTable, (0, combi_1.plusPrio)(awith), (0, combi_1.plusPrio)(awith), spool, lineSize, lineCount, archive, archiveMode, receiver, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, listDataset, listAuthority, coverPage, department, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
20476
20506
  const ret = (0, combi_1.seq)("SUBMIT", prog, (0, combi_1.opt)(perm));
20477
20507
  return (0, combi_1.verNotLang)(version_1.LanguageVersion.Cloud, ret);
20478
20508
  }
@@ -27265,7 +27295,7 @@ class CurrentScope {
27265
27295
  else if (this.isOO() && this.current.getData().vars[upper] !== undefined) {
27266
27296
  throw new Error(`"${name}" already defined`);
27267
27297
  }
27268
- this.current.getData().types[upper] = type;
27298
+ this.current.setType(upper, type);
27269
27299
  }
27270
27300
  addExtraLikeType(type) {
27271
27301
  if (type === undefined) {
@@ -27284,7 +27314,7 @@ class CurrentScope {
27284
27314
  if (this.current.getData().extraLikeTypes[upper] !== undefined) {
27285
27315
  throw new Error(`Type name "${name}" already defined`);
27286
27316
  }
27287
- this.current.getData().extraLikeTypes[upper] = type;
27317
+ this.current.setExtraLikeType(upper, type);
27288
27318
  }
27289
27319
  addClassDefinition(c) {
27290
27320
  if (this.current === undefined) {
@@ -27294,13 +27324,13 @@ class CurrentScope {
27294
27324
  if (this.current.getData().cdefs[name] !== undefined) {
27295
27325
  throw new Error(`Class "${name}" already defined`);
27296
27326
  }
27297
- this.current.getData().cdefs[name] = c;
27327
+ this.current.setClassDefinition(name, c);
27298
27328
  }
27299
27329
  addFormDefinitions(f) {
27300
27330
  if (this.current === undefined) {
27301
27331
  return;
27302
27332
  }
27303
- this.current.getData().forms.push(...f);
27333
+ this.current.addFormDefinitions(f);
27304
27334
  }
27305
27335
  /** The FORM definitions are built up front, at that point the program level types are not known.
27306
27336
  * When the FORM statement is traversed it is replaced with one resolved in the scope of the FORM */
@@ -27325,7 +27355,7 @@ class CurrentScope {
27325
27355
  if (this.current.getData().cdefs[name] !== undefined) {
27326
27356
  throw new Error(`Interface "${name}" already defined`);
27327
27357
  }
27328
- this.current.getData().idefs[name] = i;
27358
+ this.current.setInterfaceDefinition(name, i);
27329
27359
  }
27330
27360
  addNamedIdentifier(name, identifier) {
27331
27361
  if (this.current === undefined) {
@@ -27339,7 +27369,7 @@ class CurrentScope {
27339
27369
  else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
27340
27370
  throw new Error(`"${name}" already defined`);
27341
27371
  }
27342
- this.current.getData().vars[upper] = identifier;
27372
+ this.current.setVariable(upper, identifier);
27343
27373
  }
27344
27374
  addNamedIdentifierToParent(name, identifier) {
27345
27375
  if (this.current === undefined) {
@@ -27357,7 +27387,7 @@ class CurrentScope {
27357
27387
  else if (this.isOO() && parent.getData().types[upper] !== undefined) {
27358
27388
  throw new Error(`"${name}" already defined`);
27359
27389
  }
27360
- parent.getData().vars[upper] = identifier;
27390
+ parent.setVariable(upper, identifier);
27361
27391
  }
27362
27392
  addIdentifier(identifier) {
27363
27393
  if (identifier === undefined) {
@@ -27369,7 +27399,7 @@ class CurrentScope {
27369
27399
  if (token === undefined) {
27370
27400
  return;
27371
27401
  }
27372
- this.current.getData().deferred[token.getStr().toUpperCase()] = { token, ooType: type };
27402
+ this.current.setDeferred(token.getStr().toUpperCase(), { token, ooType: type });
27373
27403
  }
27374
27404
  addListPrefix(identifiers, prefix) {
27375
27405
  for (const id of identifiers) {
@@ -27389,16 +27419,16 @@ class CurrentScope {
27389
27419
  const position = new _identifier_1.Identifier(usage, filename);
27390
27420
  if (Array.isArray(type)) {
27391
27421
  for (const t of type) {
27392
- (_a = this.current) === null || _a === void 0 ? void 0 : _a.getData().references.push({ position, resolved: referencing, referenceType: t, extra });
27422
+ (_a = this.current) === null || _a === void 0 ? void 0 : _a.addReference({ position, resolved: referencing, referenceType: t, extra });
27393
27423
  }
27394
27424
  }
27395
27425
  else {
27396
- (_b = this.current) === null || _b === void 0 ? void 0 : _b.getData().references.push({ position, resolved: referencing, referenceType: type, extra });
27426
+ (_b = this.current) === null || _b === void 0 ? void 0 : _b.addReference({ position, resolved: referencing, referenceType: type, extra });
27397
27427
  }
27398
27428
  }
27399
27429
  addSQLConversion(fieldName, message, token) {
27400
27430
  var _a;
27401
- (_a = this.current) === null || _a === void 0 ? void 0 : _a.getData().sqlConversion.push({ fieldName, message, token });
27431
+ (_a = this.current) === null || _a === void 0 ? void 0 : _a.addSQLConversion({ fieldName, message, token });
27402
27432
  }
27403
27433
  ///////////////////////////
27404
27434
  findFunctionModule(name) {
@@ -27434,6 +27464,9 @@ class CurrentScope {
27434
27464
  return undefined;
27435
27465
  }
27436
27466
  const name = (_a = this.parentObj.getClassDefinition()) === null || _a === void 0 ? void 0 : _a.behaviorDefinitionName;
27467
+ return this.findBehaviorDefinitionByName(name);
27468
+ }
27469
+ findBehaviorDefinitionByName(name) {
27437
27470
  if (name === undefined) {
27438
27471
  return undefined;
27439
27472
  }
@@ -27763,6 +27796,84 @@ exports.CurrentScope = CurrentScope;
27763
27796
 
27764
27797
  /***/ },
27765
27798
 
27799
+ /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js"
27800
+ /*!*********************************************************************!*\
27801
+ !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js ***!
27802
+ \*********************************************************************/
27803
+ (__unused_webpack_module, exports, __webpack_require__) {
27804
+
27805
+ "use strict";
27806
+
27807
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
27808
+ if (k2 === undefined) k2 = k;
27809
+ var desc = Object.getOwnPropertyDescriptor(m, k);
27810
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
27811
+ desc = { enumerable: true, get: function() { return m[k]; } };
27812
+ }
27813
+ Object.defineProperty(o, k2, desc);
27814
+ }) : (function(o, m, k, k2) {
27815
+ if (k2 === undefined) k2 = k;
27816
+ o[k2] = m[k];
27817
+ }));
27818
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27819
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
27820
+ }) : function(o, v) {
27821
+ o["default"] = v;
27822
+ });
27823
+ var __importStar = (this && this.__importStar) || (function () {
27824
+ var ownKeys = function(o) {
27825
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27826
+ var ar = [];
27827
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27828
+ return ar;
27829
+ };
27830
+ return ownKeys(o);
27831
+ };
27832
+ return function (mod) {
27833
+ if (mod && mod.__esModule) return mod;
27834
+ var result = {};
27835
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
27836
+ __setModuleDefault(result, mod);
27837
+ return result;
27838
+ };
27839
+ })();
27840
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
27841
+ exports.EML = void 0;
27842
+ const Expressions = __importStar(__webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
27843
+ const _syntax_input_1 = __webpack_require__(/*! ./_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
27844
+ /** checks the entities referenced in EML statements, eg. READ ENTITIES and MODIFY ENTITIES */
27845
+ class EML {
27846
+ static checkEntities(node, input) {
27847
+ var _a;
27848
+ var _b;
27849
+ const nameNode = node.findDirectExpression(Expressions.NamespaceSimpleName);
27850
+ if (nameNode === undefined) {
27851
+ // eg. dynamic "MODIFY ENTITIES OPERATIONS" or "ENTITY zentity\_association"
27852
+ return;
27853
+ }
27854
+ const name = nameNode.concatTokens();
27855
+ const scope = input.scope;
27856
+ if (node.findDirectTokenByText("ENTITIES") !== undefined) {
27857
+ // "ENTITIES OF" refers to the behavior definition
27858
+ if (scope.findBehaviorDefinitionByName(name) === undefined && scope.getDDIC().inErrorNamespace(name)) {
27859
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameNode.getFirstToken(), `Behavior definition "${name}" not found`));
27860
+ }
27861
+ return;
27862
+ }
27863
+ // single "ENTITY", inside a behavior pool the alias defined in the BDEF can be used
27864
+ const entity = (_b = (_a = scope.findBehaviorDefinition()) === null || _a === void 0 ? void 0 : _a.findEntityNameByAlias(name)) !== null && _b !== void 0 ? _b : name;
27865
+ if (scope.getDDIC().inErrorNamespace(entity)
27866
+ && scope.findBehaviorDefinitionByName(entity) === undefined
27867
+ && scope.getDDIC().lookupDDLS(entity) === undefined) {
27868
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, nameNode.getFirstToken(), `Entity "${name}" not found`));
27869
+ }
27870
+ }
27871
+ }
27872
+ exports.EML = EML;
27873
+ //# sourceMappingURL=_eml.js.map
27874
+
27875
+ /***/ },
27876
+
27766
27877
  /***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_loop_table_change.js"
27767
27878
  /*!***********************************************************************************!*\
27768
27879
  !*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/_loop_table_change.js ***!
@@ -28133,6 +28244,16 @@ class ObjectOriented {
28133
28244
  }
28134
28245
  return `The special method "${name}" cannot be called directly`;
28135
28246
  }
28247
+ // classic exceptions cannot be raised in a method declaring class based exceptions, returns the message otherwise
28248
+ checkClassicException() {
28249
+ var _a;
28250
+ const methodName = this.scope.getEnclosingMethodName();
28251
+ const classDef = this.scope.findClassDefinition(this.scope.getEnclosingClassName());
28252
+ if (methodName && classDef && ((_a = this.searchMethodName(classDef, methodName).method) === null || _a === void 0 ? void 0 : _a.getRaising().length)) {
28253
+ return "Classic exceptions cannot be raised in methods with class based exceptions";
28254
+ }
28255
+ return undefined;
28256
+ }
28136
28257
  // SUPER-> can only call the previous implementation of the method it is used in, returns the message otherwise
28137
28258
  // both names are resolved in the super class, so an alias and the method it stands for are the same
28138
28259
  checkSuperCall(superDef, methodName) {
@@ -29733,6 +29854,7 @@ const expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ "./
29733
29854
  const _builtin_1 = __webpack_require__(/*! ./_builtin */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js");
29734
29855
  const position_1 = __webpack_require__(/*! ../../position */ "./node_modules/@abaplint/core/build/src/position.js");
29735
29856
  const _syntax_input_1 = __webpack_require__(/*! ./_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
29857
+ const version_1 = __webpack_require__(/*! ../../version */ "./node_modules/@abaplint/core/build/src/version.js");
29736
29858
  class BasicTypes {
29737
29859
  constructor(input) {
29738
29860
  this.input = input;
@@ -29958,7 +30080,14 @@ class BasicTypes {
29958
30080
  }
29959
30081
  const chainText = typeName.concatTokens().toUpperCase();
29960
30082
  const f = this.input.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);
29961
- if (f !== undefined) {
30083
+ if (f instanceof Types.Integer8Type
30084
+ && !(0, version_1.releaseAtLeast)(this.input.scope.getRelease(), version_1.Release.v750)
30085
+ && !this.input.scope.getOpenABAP()) {
30086
+ const message = "Type INT8 requires 7.50";
30087
+ this.input.issues.push((0, _syntax_input_1.syntaxIssue)(this.input, typeName.getFirstToken(), message));
30088
+ return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
30089
+ }
30090
+ else if (f !== undefined) {
29962
30091
  return f;
29963
30092
  }
29964
30093
  const typ = this.input.scope.findType(chainText);
@@ -30752,6 +30881,10 @@ class BasicTypes {
30752
30881
  this.input.issues.push((0, _syntax_input_1.syntaxIssue)(this.input, chain.getFirstToken(), message));
30753
30882
  return undefined;
30754
30883
  }
30884
+ else if (concat === "SY-REPID" || concat === "SYST-REPID") {
30885
+ // predefined constant in every program, not a SYST component
30886
+ return undefined;
30887
+ }
30755
30888
  return this.resolveConstantValue(chain);
30756
30889
  }
30757
30890
  throw new Error("findValue, unexpected");
@@ -38742,23 +38875,81 @@ const _typed_identifier_1 = __webpack_require__(/*! ../types/_typed_identifier *
38742
38875
  const _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
38743
38876
  const _reference_1 = __webpack_require__(/*! ./_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
38744
38877
  const assert_error_1 = __webpack_require__(/*! ./assert_error */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/assert_error.js");
38878
+ // most scopes only use a few of the containers, empty ones are shared and replaced on first write
38879
+ const EMPTY_OBJECT = Object.freeze({});
38880
+ const EMPTY_ARRAY = Object.freeze([]);
38745
38881
  class ScopeData {
38746
38882
  constructor() {
38747
38883
  this.data = {
38748
- vars: {},
38749
- cdefs: {},
38750
- idefs: {},
38751
- forms: [], // todo, refactor to object
38752
- types: {},
38753
- extraLikeTypes: {},
38754
- deferred: {},
38755
- references: [],
38756
- sqlConversion: [],
38884
+ vars: EMPTY_OBJECT,
38885
+ cdefs: EMPTY_OBJECT,
38886
+ idefs: EMPTY_OBJECT,
38887
+ forms: EMPTY_ARRAY, // todo, refactor to object
38888
+ types: EMPTY_OBJECT,
38889
+ extraLikeTypes: EMPTY_OBJECT,
38890
+ deferred: EMPTY_OBJECT,
38891
+ references: EMPTY_ARRAY,
38892
+ sqlConversion: EMPTY_ARRAY,
38757
38893
  };
38758
38894
  }
38759
38895
  getData() {
38760
38896
  return this.data;
38761
38897
  }
38898
+ // the shared empty containers are frozen, the methods below replace them on first write
38899
+ setVariable(name, identifier) {
38900
+ if (this.data.vars === EMPTY_OBJECT) {
38901
+ this.data.vars = {};
38902
+ }
38903
+ this.data.vars[name] = identifier;
38904
+ }
38905
+ setType(name, type) {
38906
+ if (this.data.types === EMPTY_OBJECT) {
38907
+ this.data.types = {};
38908
+ }
38909
+ this.data.types[name] = type;
38910
+ }
38911
+ setExtraLikeType(name, type) {
38912
+ if (this.data.extraLikeTypes === EMPTY_OBJECT) {
38913
+ this.data.extraLikeTypes = {};
38914
+ }
38915
+ this.data.extraLikeTypes[name] = type;
38916
+ }
38917
+ setDeferred(name, deferred) {
38918
+ if (this.data.deferred === EMPTY_OBJECT) {
38919
+ this.data.deferred = {};
38920
+ }
38921
+ this.data.deferred[name] = deferred;
38922
+ }
38923
+ setClassDefinition(name, cdef) {
38924
+ if (this.data.cdefs === EMPTY_OBJECT) {
38925
+ this.data.cdefs = {};
38926
+ }
38927
+ this.data.cdefs[name] = cdef;
38928
+ }
38929
+ setInterfaceDefinition(name, idef) {
38930
+ if (this.data.idefs === EMPTY_OBJECT) {
38931
+ this.data.idefs = {};
38932
+ }
38933
+ this.data.idefs[name] = idef;
38934
+ }
38935
+ addFormDefinitions(forms) {
38936
+ if (this.data.forms === EMPTY_ARRAY) {
38937
+ this.data.forms = [];
38938
+ }
38939
+ this.data.forms.push(...forms);
38940
+ }
38941
+ addReference(reference) {
38942
+ if (this.data.references === EMPTY_ARRAY) {
38943
+ this.data.references = [];
38944
+ }
38945
+ this.data.references.push(reference);
38946
+ }
38947
+ addSQLConversion(conversion) {
38948
+ if (this.data.sqlConversion === EMPTY_ARRAY) {
38949
+ this.data.sqlConversion = [];
38950
+ }
38951
+ this.data.sqlConversion.push(conversion);
38952
+ }
38762
38953
  }
38763
38954
  class SpaghettiScopeNode extends ScopeData {
38764
38955
  [Symbol.for("debug.description")]() {
@@ -44380,6 +44571,10 @@ class InsertInternal {
44380
44571
  if (sourceType instanceof basic_1.IntegerType && targetType instanceof basic_1.Integer8Type) {
44381
44572
  error = true;
44382
44573
  }
44574
+ else if (targetType instanceof basic_1.TableType && targetType.isWithHeader() && sourceType instanceof basic_1.TableType) {
44575
+ // LINES OF into a table with header line, compare the row types
44576
+ error = new _type_utils_1.TypeUtils(input.scope).isAssignable(sourceType.getRowType(), targetType.getRowType()) === false;
44577
+ }
44383
44578
  else if (new _type_utils_1.TypeUtils(input.scope).isAssignable(sourceType, targetType) === false) {
44384
44579
  error = true;
44385
44580
  }
@@ -44963,8 +45158,16 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
44963
45158
  const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
44964
45159
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
44965
45160
  const message_source_1 = __webpack_require__(/*! ../expressions/message_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/message_source.js");
45161
+ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
45162
+ const _object_oriented_1 = __webpack_require__(/*! ../_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
44966
45163
  class Message {
44967
45164
  runSyntax(node, input) {
45165
+ const exceptionName = node.findDirectExpression(Expressions.ExceptionName);
45166
+ const classicMessage = exceptionName ? new _object_oriented_1.ObjectOriented(input.scope).checkClassicException() : undefined;
45167
+ if (exceptionName && classicMessage) {
45168
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, exceptionName.getFirstToken(), classicMessage));
45169
+ return;
45170
+ }
44968
45171
  const found = node.findExpressionAfterToken("INTO");
44969
45172
  const inline = found === null || found === void 0 ? void 0 : found.findDirectExpression(Expressions.InlineData);
44970
45173
  if (inline) {
@@ -45230,8 +45433,10 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
45230
45433
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
45231
45434
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
45232
45435
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
45436
+ const _eml_1 = __webpack_require__(/*! ../_eml */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js");
45233
45437
  class ModifyEntities {
45234
45438
  runSyntax(node, input) {
45439
+ _eml_1.EML.checkEntities(node, input);
45235
45440
  for (const s of node.findDirectExpressions(Expressions.Source)) {
45236
45441
  source_1.Source.runSyntax(s, input);
45237
45442
  }
@@ -46207,6 +46412,12 @@ class Raise {
46207
46412
  var _a, _b, _c, _d, _e, _f;
46208
46413
  const helper = new _object_oriented_1.ObjectOriented(input.scope);
46209
46414
  let method;
46415
+ const exceptionName = node.findDirectExpression(Expressions.ExceptionName);
46416
+ const classicMessage = exceptionName ? helper.checkClassicException() : undefined;
46417
+ if (exceptionName && classicMessage) {
46418
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, exceptionName.getFirstToken(), classicMessage));
46419
+ return;
46420
+ }
46210
46421
  const classTok = (_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
46211
46422
  const className = classTok === null || classTok === void 0 ? void 0 : classTok.getStr();
46212
46423
  if (classTok && className) {
@@ -46541,8 +46752,10 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
46541
46752
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
46542
46753
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
46543
46754
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
46755
+ const _eml_1 = __webpack_require__(/*! ../_eml */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_eml.js");
46544
46756
  class ReadEntities {
46545
46757
  runSyntax(node, input) {
46758
+ _eml_1.EML.checkEntities(node, input);
46546
46759
  for (const s of node.findDirectExpressions(Expressions.Source)) {
46547
46760
  source_1.Source.runSyntax(s, input);
46548
46761
  }
@@ -51695,7 +51908,6 @@ const _abstract_node_1 = __webpack_require__(/*! ./_abstract_node */ "./node_mod
51695
51908
  class ExpressionNode extends _abstract_node_1.AbstractNode {
51696
51909
  constructor(expression) {
51697
51910
  super();
51698
- this.tokenCount = 0;
51699
51911
  this.expression = expression;
51700
51912
  }
51701
51913
  addChild(_n) {
@@ -51706,13 +51918,15 @@ class ExpressionNode extends _abstract_node_1.AbstractNode {
51706
51918
  }
51707
51919
  setChildren(children) {
51708
51920
  super.setChildren(children);
51709
- for (const child of this.getChildren()) {
51710
- this.tokenCount = this.tokenCount + child.countTokens();
51711
- }
51712
51921
  return this;
51713
51922
  }
51923
+ // not stored on the node, saves a field per ExpressionNode, the statement parser tracks counts itself
51714
51924
  countTokens() {
51715
- return this.tokenCount;
51925
+ let count = 0;
51926
+ for (const child of this.getChildren()) {
51927
+ count = count + child.countTokens();
51928
+ }
51929
+ return count;
51716
51930
  }
51717
51931
  getFirstToken() {
51718
51932
  for (const child of this.getChildren()) {
@@ -56644,6 +56858,874 @@ exports.ArtifactsRules = ArtifactsRules;
56644
56858
 
56645
56859
  /***/ },
56646
56860
 
56861
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/bdef_parser.js"
56862
+ /*!*******************************************************************!*\
56863
+ !*** ./node_modules/@abaplint/core/build/src/bdef/bdef_parser.js ***!
56864
+ \*******************************************************************/
56865
+ (__unused_webpack_module, exports, __webpack_require__) {
56866
+
56867
+ "use strict";
56868
+
56869
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
56870
+ if (k2 === undefined) k2 = k;
56871
+ var desc = Object.getOwnPropertyDescriptor(m, k);
56872
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
56873
+ desc = { enumerable: true, get: function() { return m[k]; } };
56874
+ }
56875
+ Object.defineProperty(o, k2, desc);
56876
+ }) : (function(o, m, k, k2) {
56877
+ if (k2 === undefined) k2 = k;
56878
+ o[k2] = m[k];
56879
+ }));
56880
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
56881
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
56882
+ }) : function(o, v) {
56883
+ o["default"] = v;
56884
+ });
56885
+ var __importStar = (this && this.__importStar) || (function () {
56886
+ var ownKeys = function(o) {
56887
+ ownKeys = Object.getOwnPropertyNames || function (o) {
56888
+ var ar = [];
56889
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
56890
+ return ar;
56891
+ };
56892
+ return ownKeys(o);
56893
+ };
56894
+ return function (mod) {
56895
+ if (mod && mod.__esModule) return mod;
56896
+ var result = {};
56897
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
56898
+ __setModuleDefault(result, mod);
56899
+ return result;
56900
+ };
56901
+ })();
56902
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
56903
+ exports.BDEFParser = void 0;
56904
+ const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
56905
+ const combi_1 = __webpack_require__(/*! ../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
56906
+ const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
56907
+ const cds_lexer_1 = __webpack_require__(/*! ../cds/cds_lexer */ "./node_modules/@abaplint/core/build/src/cds/cds_lexer.js");
56908
+ const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
56909
+ const Expressions = __importStar(__webpack_require__(/*! ./expressions */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js"));
56910
+ class BDEFParser {
56911
+ parse(file) {
56912
+ if (file === undefined) {
56913
+ return undefined;
56914
+ }
56915
+ // BDEF has the same comments, strings and delimiters as CDS
56916
+ const tokens = this.removePragmas(cds_lexer_1.CDSLexer.run(file).filter(t => !(t instanceof tokens_1.Comment)));
56917
+ const res = combi_1.Combi.run(new Expressions.BDEFDefinition(), tokens, version_1.defaultRelease);
56918
+ if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
56919
+ return undefined;
56920
+ }
56921
+ return res[0];
56922
+ }
56923
+ /** pragmas can occur in many places, eg. "##NOT_ASSIGNED_TO_DETACT" or "##UNMAPPED_FIELD[SingletonID]" */
56924
+ removePragmas(tokens) {
56925
+ var _a;
56926
+ const ret = [];
56927
+ for (let i = 0; i < tokens.length; i++) {
56928
+ if (tokens[i].getStr().startsWith("##") === false) {
56929
+ ret.push(tokens[i]);
56930
+ continue;
56931
+ }
56932
+ if (((_a = tokens[i + 1]) === null || _a === void 0 ? void 0 : _a.getStr()) === "[") {
56933
+ while (i < tokens.length - 1 && tokens[i].getStr() !== "]") {
56934
+ i++;
56935
+ }
56936
+ }
56937
+ }
56938
+ return ret;
56939
+ }
56940
+ }
56941
+ exports.BDEFParser = BDEFParser;
56942
+ //# sourceMappingURL=bdef_parser.js.map
56943
+
56944
+ /***/ },
56945
+
56946
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_action.js"
56947
+ /*!*******************************************************************************!*\
56948
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_action.js ***!
56949
+ \*******************************************************************************/
56950
+ (__unused_webpack_module, exports, __webpack_require__) {
56951
+
56952
+ "use strict";
56953
+
56954
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
56955
+ exports.BDEFAction = void 0;
56956
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
56957
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
56958
+ /** actions and functions, eg. "static factory action ( features : global ) copy parameter ZPARAM result [1] $self;" */
56959
+ class BDEFAction extends combi_1.Expression {
56960
+ getRunnable() {
56961
+ const modifier = (0, combi_1.altPrio)("INTERNAL", "STATIC", "FACTORY", "DEFAULT", "DRAFT", "REPEATABLE", "RECOMMENDATION", (0, combi_1.seq)("SAVE", (0, combi_1.optPrio)(_1.BDEFOptions)), (0, combi_1.seq)("KEY", _1.BDEFOptions));
56962
+ const tail = (0, combi_1.altPrio)((0, combi_1.seq)("EXTERNAL", _1.BDEFString), (0, combi_1.seq)("AS", _1.BDEFName), _1.BDEFParameter, _1.BDEFResult, _1.BDEFCardinality, "OPTIMIZED", "EXTENSIBLE", "WITH ADDITIONAL IMPLEMENTATION");
56963
+ return (0, combi_1.seq)((0, combi_1.starPrio)(modifier), (0, combi_1.altPrio)("ACTION", "FUNCTION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.starPrio)(tail), (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction));
56964
+ }
56965
+ }
56966
+ exports.BDEFAction = BDEFAction;
56967
+ //# sourceMappingURL=bdef_action.js.map
56968
+
56969
+ /***/ },
56970
+
56971
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_alias.js"
56972
+ /*!******************************************************************************!*\
56973
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_alias.js ***!
56974
+ \******************************************************************************/
56975
+ (__unused_webpack_module, exports, __webpack_require__) {
56976
+
56977
+ "use strict";
56978
+
56979
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
56980
+ exports.BDEFAlias = void 0;
56981
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
56982
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
56983
+ class BDEFAlias extends combi_1.Expression {
56984
+ getRunnable() {
56985
+ return (0, combi_1.seq)("ALIAS", _1.BDEFName);
56986
+ }
56987
+ }
56988
+ exports.BDEFAlias = BDEFAlias;
56989
+ //# sourceMappingURL=bdef_alias.js.map
56990
+
56991
+ /***/ },
56992
+
56993
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association.js"
56994
+ /*!************************************************************************************!*\
56995
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association.js ***!
56996
+ \************************************************************************************/
56997
+ (__unused_webpack_module, exports, __webpack_require__) {
56998
+
56999
+ "use strict";
57000
+
57001
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57002
+ exports.BDEFAssociation = void 0;
57003
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57004
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57005
+ /** eg. "association _Booking { create; with draft; }" */
57006
+ class BDEFAssociation extends combi_1.Expression {
57007
+ getRunnable() {
57008
+ // cross BO association, eg. "using /DMO/R_TRAVELTP_XBO \_Agency"
57009
+ const using = (0, combi_1.seq)("USING", _1.BDEFName, (0, combi_1.optPrio)((0, combi_1.regex)(/^\\\w+$/)));
57010
+ return (0, combi_1.seq)((0, combi_1.starPrio)((0, combi_1.altPrio)("INTERNAL", "UNMANAGED", "ANCESTOR")), "ASSOCIATION", (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.optPrio)(using), (0, combi_1.optPrio)((0, combi_1.seq)("ABBREVIATION", _1.BDEFName)), (0, combi_1.optPrio)("WITH HIERARCHY"), (0, combi_1.altPrio)(";", _1.BDEFAssociationBody));
57011
+ }
57012
+ }
57013
+ exports.BDEFAssociation = BDEFAssociation;
57014
+ //# sourceMappingURL=bdef_association.js.map
57015
+
57016
+ /***/ },
57017
+
57018
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association_body.js"
57019
+ /*!*****************************************************************************************!*\
57020
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association_body.js ***!
57021
+ \*****************************************************************************************/
57022
+ (__unused_webpack_module, exports, __webpack_require__) {
57023
+
57024
+ "use strict";
57025
+
57026
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57027
+ exports.BDEFAssociationBody = void 0;
57028
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57029
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57030
+ /** eg. "{ create ( features : instance ); with draft; link action linkManager; }" */
57031
+ class BDEFAssociationBody extends combi_1.Expression {
57032
+ getRunnable() {
57033
+ const create = (0, combi_1.seq)((0, combi_1.optPrio)("INTERNAL"), "CREATE", (0, combi_1.optPrio)(_1.BDEFOptions), (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction));
57034
+ const withh = (0, combi_1.seq)("WITH", (0, combi_1.altPrio)("DRAFT", "DEPENDENT DRAFT", "CASCADING DELETE"), ";");
57035
+ const link = (0, combi_1.seq)((0, combi_1.altPrio)("LINK", "UNLINK"), "ACTION", _1.BDEFName, ";");
57036
+ const inverse = (0, combi_1.seq)("INVERSE FUNCTION", _1.BDEFName, ";");
57037
+ const item = (0, combi_1.altPrio)(create, withh, link, inverse, ";");
57038
+ return (0, combi_1.seq)("{", (0, combi_1.starPrio)(item), "}");
57039
+ }
57040
+ }
57041
+ exports.BDEFAssociationBody = BDEFAssociationBody;
57042
+ //# sourceMappingURL=bdef_association_body.js.map
57043
+
57044
+ /***/ },
57045
+
57046
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_authorization_context.js"
57047
+ /*!**********************************************************************************************!*\
57048
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_authorization_context.js ***!
57049
+ \**********************************************************************************************/
57050
+ (__unused_webpack_module, exports, __webpack_require__) {
57051
+
57052
+ "use strict";
57053
+
57054
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57055
+ exports.BDEFAuthorizationContext = void 0;
57056
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57057
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57058
+ /** eg. "define own authorization context { 'S_TABU_NAM'; }" or "define own authorization context by privileged mode;" */
57059
+ class BDEFAuthorizationContext extends combi_1.Expression {
57060
+ getRunnable() {
57061
+ const item = (0, combi_1.seq)((0, combi_1.altPrio)(_1.BDEFString, _1.BDEFName), ";");
57062
+ const body = (0, combi_1.seq)("{", (0, combi_1.starPrio)(item), "}", (0, combi_1.optPrio)(";"));
57063
+ const privileged = (0, combi_1.seq)("BY PRIVILEGED MODE", (0, combi_1.optPrio)("AND"));
57064
+ return (0, combi_1.seq)("DEFINE", (0, combi_1.optPrio)("OWN"), "AUTHORIZATION CONTEXT", (0, combi_1.optPrio)((0, combi_1.altPrio)(privileged, _1.BDEFName)), (0, combi_1.optPrio)((0, combi_1.seq)("FOR DISABLE", _1.BDEFOptions)), (0, combi_1.altPrio)(";", body));
57065
+ }
57066
+ }
57067
+ exports.BDEFAuthorizationContext = BDEFAuthorizationContext;
57068
+ //# sourceMappingURL=bdef_authorization_context.js.map
57069
+
57070
+ /***/ },
57071
+
57072
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_cardinality.js"
57073
+ /*!************************************************************************************!*\
57074
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_cardinality.js ***!
57075
+ \************************************************************************************/
57076
+ (__unused_webpack_module, exports, __webpack_require__) {
57077
+
57078
+ "use strict";
57079
+
57080
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57081
+ exports.BDEFCardinality = void 0;
57082
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57083
+ /** eg. "[1]" or "[0..*]" */
57084
+ class BDEFCardinality extends combi_1.Expression {
57085
+ getRunnable() {
57086
+ const integer = (0, combi_1.regex)(/^\d+$/);
57087
+ return (0, combi_1.seq)("[", integer, (0, combi_1.optPrio)((0, combi_1.seq)(".", ".", (0, combi_1.altPrio)(integer, "*"))), "]");
57088
+ }
57089
+ }
57090
+ exports.BDEFCardinality = BDEFCardinality;
57091
+ //# sourceMappingURL=bdef_cardinality.js.map
57092
+
57093
+ /***/ },
57094
+
57095
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_default_function.js"
57096
+ /*!*****************************************************************************************!*\
57097
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_default_function.js ***!
57098
+ \*****************************************************************************************/
57099
+ (__unused_webpack_module, exports, __webpack_require__) {
57100
+
57101
+ "use strict";
57102
+
57103
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57104
+ exports.BDEFDefaultFunction = void 0;
57105
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57106
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57107
+ /** eg. "{ default function GetDefaultsForCreate; }" */
57108
+ class BDEFDefaultFunction extends combi_1.Expression {
57109
+ getRunnable() {
57110
+ const func = (0, combi_1.seq)("DEFAULT FUNCTION", (0, combi_1.optPrio)((0, combi_1.seq)(_1.BDEFName, (0, combi_1.optPrio)((0, combi_1.seq)("EXTERNAL", _1.BDEFString)))), ";");
57111
+ return (0, combi_1.seq)("{", (0, combi_1.plusPrio)(func), "}");
57112
+ }
57113
+ }
57114
+ exports.BDEFDefaultFunction = BDEFDefaultFunction;
57115
+ //# sourceMappingURL=bdef_default_function.js.map
57116
+
57117
+ /***/ },
57118
+
57119
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_define_behavior.js"
57120
+ /*!****************************************************************************************!*\
57121
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_define_behavior.js ***!
57122
+ \****************************************************************************************/
57123
+ (__unused_webpack_module, exports, __webpack_require__) {
57124
+
57125
+ "use strict";
57126
+
57127
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57128
+ exports.BDEFDefineBehavior = void 0;
57129
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57130
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57131
+ /** behavior of one entity, "define behavior for ZI_Travel alias Travel ... { ... }" */
57132
+ class BDEFDefineBehavior extends combi_1.Expression {
57133
+ getRunnable() {
57134
+ const fieldMapping = (0, combi_1.seq)(_1.BDEFName, "=", _1.BDEFName);
57135
+ const lockMapping = (0, combi_1.seq)("(", fieldMapping, (0, combi_1.starPrio)((0, combi_1.seq)(",", fieldMapping)), ")");
57136
+ const dependentBy = (0, combi_1.seq)("DEPENDENT", (0, combi_1.optPrio)((0, combi_1.seq)("BY", _1.BDEFName)));
57137
+ const save = (0, combi_1.seq)((0, combi_1.altPrio)("WITH ADDITIONAL SAVE", "WITH UNMANAGED SAVE"), (0, combi_1.optPrio)("AND CLEANUP"), (0, combi_1.optPrio)("WITH FULL DATA"));
57138
+ const option = (0, combi_1.altPrio)(_1.BDEFAlias, _1.BDEFImplementationIn, (0, combi_1.seq)("EXTERNAL", _1.BDEFString), (0, combi_1.seq)("PERSISTENT TABLE", _1.BDEFName), (0, combi_1.seq)("DRAFT TABLE", _1.BDEFName), (0, combi_1.seq)("QUERY", _1.BDEFName), (0, combi_1.seq)("LOCK", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", (0, combi_1.optPrio)("UNMANAGED")), (0, combi_1.seq)(dependentBy, (0, combi_1.optPrio)(lockMapping)))), (0, combi_1.seq)("AUTHORIZATION", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", _1.BDEFOptions), dependentBy)), (0, combi_1.seq)((0, combi_1.optPrio)("TOTAL"), "ETAG", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", _1.BDEFName), dependentBy, _1.BDEFName)),
57139
+ // eg. "( lock, authorization, etag ) dependent by _Travel"
57140
+ (0, combi_1.seq)(_1.BDEFOptions, dependentBy), (0, combi_1.seq)((0, combi_1.altPrio)("LATE", "EARLY"), "NUMBERING", (0, combi_1.optPrio)("IN PLACE")), save, "WITH CONTROL", "USE ETAG", (0, combi_1.seq)("USING", _1.BDEFName), (0, combi_1.seq)("CHANGEDOCUMENTS", (0, combi_1.altPrio)((0, combi_1.seq)("MASTER", (0, combi_1.optPrio)("UTC"), (0, combi_1.optPrio)(_1.BDEFOptions)), dependentBy)), "EXTENSIBLE");
57141
+ const item = (0, combi_1.altPrio)(_1.BDEFUse, _1.BDEFDetermineAction, _1.BDEFOperation, _1.BDEFAction, _1.BDEFDetermination, _1.BDEFField, _1.BDEFAssociation, _1.BDEFMapping, _1.BDEFSideEffects, _1.BDEFEvent, _1.BDEFHierarchy, _1.BDEFKey, (0, combi_1.seq)("CHANGEDOCUMENTS", _1.BDEFOptions, ";"), ";");
57142
+ return (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.seq)("DEFINE", (0, combi_1.optPrio)("ROOT"), "BEHAVIOR FOR"), "EXTEND BEHAVIOR FOR"), _1.BDEFName, (0, combi_1.starPrio)(option), "{", (0, combi_1.starPrio)(item), "}", (0, combi_1.optPrio)(";"));
57143
+ }
57144
+ }
57145
+ exports.BDEFDefineBehavior = BDEFDefineBehavior;
57146
+ //# sourceMappingURL=bdef_define_behavior.js.map
57147
+
57148
+ /***/ },
57149
+
57150
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_definition.js"
57151
+ /*!***********************************************************************************!*\
57152
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_definition.js ***!
57153
+ \***********************************************************************************/
57154
+ (__unused_webpack_module, exports, __webpack_require__) {
57155
+
57156
+ "use strict";
57157
+
57158
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57159
+ exports.BDEFDefinition = void 0;
57160
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57161
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57162
+ class BDEFDefinition extends combi_1.Expression {
57163
+ getRunnable() {
57164
+ return (0, combi_1.seq)(_1.BDEFImplementationType, (0, combi_1.starPrio)((0, combi_1.altPrio)(_1.BDEFHeader, _1.BDEFDefineBehavior, _1.BDEFAuthorizationContext)));
57165
+ }
57166
+ }
57167
+ exports.BDEFDefinition = BDEFDefinition;
57168
+ //# sourceMappingURL=bdef_definition.js.map
57169
+
57170
+ /***/ },
57171
+
57172
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determination.js"
57173
+ /*!**************************************************************************************!*\
57174
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determination.js ***!
57175
+ \**************************************************************************************/
57176
+ (__unused_webpack_module, exports, __webpack_require__) {
57177
+
57178
+ "use strict";
57179
+
57180
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57181
+ exports.BDEFDetermination = void 0;
57182
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57183
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57184
+ /** determinations and validations, eg. "validation validateDates on save { create; field BeginDate, EndDate; }" */
57185
+ class BDEFDetermination extends combi_1.Expression {
57186
+ getRunnable() {
57187
+ const fields = (0, combi_1.seq)(_1.BDEFFieldPath, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFFieldPath)));
57188
+ const trigger = (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), ";"), (0, combi_1.seq)("FIELD", fields, ";"), (0, combi_1.seq)("ENTITY", fields, ";"), ";");
57189
+ return (0, combi_1.seq)((0, combi_1.altPrio)("DETERMINATION", "VALIDATION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, "ON", (0, combi_1.altPrio)("MODIFY", "SAVE"), "{", (0, combi_1.starPrio)(trigger), "}");
57190
+ }
57191
+ }
57192
+ exports.BDEFDetermination = BDEFDetermination;
57193
+ //# sourceMappingURL=bdef_determination.js.map
57194
+
57195
+ /***/ },
57196
+
57197
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determine_action.js"
57198
+ /*!*****************************************************************************************!*\
57199
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determine_action.js ***!
57200
+ \*****************************************************************************************/
57201
+ (__unused_webpack_module, exports, __webpack_require__) {
57202
+
57203
+ "use strict";
57204
+
57205
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57206
+ exports.BDEFDetermineAction = void 0;
57207
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57208
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57209
+ /** eg. "draft determine action Prepare { validation validateDate; determination ( always ) Child ~ setStatus; }" */
57210
+ class BDEFDetermineAction extends combi_1.Expression {
57211
+ getRunnable() {
57212
+ const item = (0, combi_1.seq)((0, combi_1.altPrio)("VALIDATION", "DETERMINATION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFReference, ";");
57213
+ const body = (0, combi_1.seq)("{", (0, combi_1.starPrio)(item), "}");
57214
+ return (0, combi_1.seq)((0, combi_1.optPrio)("EXTEND"), (0, combi_1.optPrio)("DRAFT"), "DETERMINE ACTION", (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.optPrio)("EXTENSIBLE"), (0, combi_1.altPrio)(";", body));
57215
+ }
57216
+ }
57217
+ exports.BDEFDetermineAction = BDEFDetermineAction;
57218
+ //# sourceMappingURL=bdef_determine_action.js.map
57219
+
57220
+ /***/ },
57221
+
57222
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_event.js"
57223
+ /*!******************************************************************************!*\
57224
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_event.js ***!
57225
+ \******************************************************************************/
57226
+ (__unused_webpack_module, exports, __webpack_require__) {
57227
+
57228
+ "use strict";
57229
+
57230
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57231
+ exports.BDEFEvent = void 0;
57232
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57233
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57234
+ /** eg. "event TravelCreated parameter ZD_TRAVEL_EVENT;" or "event StatusUpdated for side effects;" */
57235
+ class BDEFEvent extends combi_1.Expression {
57236
+ getRunnable() {
57237
+ const tail = (0, combi_1.altPrio)((0, combi_1.seq)("ON", _1.BDEFName), _1.BDEFParameter, "FOR SIDE EFFECTS", (0, combi_1.seq)("DESCRIPTION", _1.BDEFString), (0, combi_1.seq)("CATEGORY", _1.BDEFName));
57238
+ return (0, combi_1.seq)((0, combi_1.optPrio)("MANAGED"), "EVENT", _1.BDEFName, (0, combi_1.starPrio)(tail), ";");
57239
+ }
57240
+ }
57241
+ exports.BDEFEvent = BDEFEvent;
57242
+ //# sourceMappingURL=bdef_event.js.map
57243
+
57244
+ /***/ },
57245
+
57246
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field.js"
57247
+ /*!******************************************************************************!*\
57248
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field.js ***!
57249
+ \******************************************************************************/
57250
+ (__unused_webpack_module, exports, __webpack_require__) {
57251
+
57252
+ "use strict";
57253
+
57254
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57255
+ exports.BDEFField = void 0;
57256
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57257
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57258
+ /** field characteristics, eg. "field ( readonly, numbering : managed ) ID, CreatedBy;" */
57259
+ class BDEFField extends combi_1.Expression {
57260
+ getRunnable() {
57261
+ return (0, combi_1.seq)("FIELD", _1.BDEFOptions, _1.BDEFFieldPath, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFFieldPath)), (0, combi_1.optPrio)(","), ";");
57262
+ }
57263
+ }
57264
+ exports.BDEFField = BDEFField;
57265
+ //# sourceMappingURL=bdef_field.js.map
57266
+
57267
+ /***/ },
57268
+
57269
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field_path.js"
57270
+ /*!***********************************************************************************!*\
57271
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field_path.js ***!
57272
+ \***********************************************************************************/
57273
+ (__unused_webpack_module, exports, __webpack_require__) {
57274
+
57275
+ "use strict";
57276
+
57277
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57278
+ exports.BDEFFieldPath = void 0;
57279
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57280
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57281
+ /** field or association, possibly via associations, eg. "_Root.TotalPieces" */
57282
+ class BDEFFieldPath extends combi_1.Expression {
57283
+ getRunnable() {
57284
+ return (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.BDEFName)));
57285
+ }
57286
+ }
57287
+ exports.BDEFFieldPath = BDEFFieldPath;
57288
+ //# sourceMappingURL=bdef_field_path.js.map
57289
+
57290
+ /***/ },
57291
+
57292
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_header.js"
57293
+ /*!*******************************************************************************!*\
57294
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_header.js ***!
57295
+ \*******************************************************************************/
57296
+ (__unused_webpack_module, exports, __webpack_require__) {
57297
+
57298
+ "use strict";
57299
+
57300
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57301
+ exports.BDEFHeader = void 0;
57302
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57303
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57304
+ /** header statements following the implementation type, eg. "strict ( 2 );" or "with draft;" */
57305
+ class BDEFHeader extends combi_1.Expression {
57306
+ getRunnable() {
57307
+ const extensibleItem = (0, combi_1.seq)("WITH", (0, combi_1.plusPrio)((0, combi_1.regex)(/^\w+$/)), ";");
57308
+ const extensible = (0, combi_1.seq)("EXTENSIBLE", (0, combi_1.optPrio)((0, combi_1.seq)("{", (0, combi_1.starPrio)(extensibleItem), "}")), (0, combi_1.optPrio)(";"));
57309
+ return (0, combi_1.altPrio)((0, combi_1.seq)("STRICT", (0, combi_1.optPrio)((0, combi_1.seq)("(", (0, combi_1.regex)(/^\d+$/), ")")), ";"), (0, combi_1.seq)("WITH DRAFT", ";"), (0, combi_1.seq)("USE DRAFT", (0, combi_1.optPrio)("AS DEPENDENT"), ";"), (0, combi_1.seq)((0, combi_1.altPrio)("WITH", "USE"), "COLLABORATIVE DRAFT", ";"), (0, combi_1.seq)("WITH PRIVILEGED MODE", (0, combi_1.optPrio)((0, combi_1.seq)("DISABLING", _1.BDEFName)), ";"), (0, combi_1.seq)("WITH MANAGED INSTANCE FILTER", ";"), (0, combi_1.seq)("WITH HIERARCHY", ";"), (0, combi_1.seq)("WITH CROSS ASSOCIATIONS", ";"), (0, combi_1.seq)("USE SIDE EFFECTS", ";"), (0, combi_1.seq)("USE RECOMMENDATIONS", ";"), (0, combi_1.seq)("FOREIGN ENTITY", _1.BDEFName, (0, combi_1.optPrio)(_1.BDEFAlias), ";"), (0, combi_1.seq)("SCALAR ENTITY", _1.BDEFName, "FIELD", _1.BDEFName, ";"), (0, combi_1.seq)("AUXILIARY CLASS", _1.BDEFName, ";"), extensible);
57310
+ }
57311
+ }
57312
+ exports.BDEFHeader = BDEFHeader;
57313
+ //# sourceMappingURL=bdef_header.js.map
57314
+
57315
+ /***/ },
57316
+
57317
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_hierarchy.js"
57318
+ /*!**********************************************************************************!*\
57319
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_hierarchy.js ***!
57320
+ \**********************************************************************************/
57321
+ (__unused_webpack_module, exports, __webpack_require__) {
57322
+
57323
+ "use strict";
57324
+
57325
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57326
+ exports.BDEFHierarchy = void 0;
57327
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57328
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57329
+ /** eg. "instance hierarchy /DMO/I_EmployeeHN { managed reorder action changeNextSibling; ascending association _Manager; }" */
57330
+ class BDEFHierarchy extends combi_1.Expression {
57331
+ getRunnable() {
57332
+ const action = (0, combi_1.seq)((0, combi_1.optPrio)("MANAGED"), (0, combi_1.altPrio)("REORDER", "COPY"), "ACTION", _1.BDEFName, ";");
57333
+ const association = (0, combi_1.seq)((0, combi_1.altPrio)("ASCENDING", "DESCENDING"), "ASSOCIATION", _1.BDEFName, (0, combi_1.altPrio)(";", _1.BDEFAssociationBody));
57334
+ const item = (0, combi_1.altPrio)(action, association, _1.BDEFField, ";");
57335
+ return (0, combi_1.seq)("INSTANCE HIERARCHY", _1.BDEFName, "{", (0, combi_1.starPrio)(item), "}");
57336
+ }
57337
+ }
57338
+ exports.BDEFHierarchy = BDEFHierarchy;
57339
+ //# sourceMappingURL=bdef_hierarchy.js.map
57340
+
57341
+ /***/ },
57342
+
57343
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_in.js"
57344
+ /*!******************************************************************************************!*\
57345
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_in.js ***!
57346
+ \******************************************************************************************/
57347
+ (__unused_webpack_module, exports, __webpack_require__) {
57348
+
57349
+ "use strict";
57350
+
57351
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57352
+ exports.BDEFImplementationIn = void 0;
57353
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57354
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57355
+ class BDEFImplementationIn extends combi_1.Expression {
57356
+ getRunnable() {
57357
+ return (0, combi_1.seq)("IMPLEMENTATION IN CLASS", _1.BDEFName, (0, combi_1.optPrio)("UNIQUE"));
57358
+ }
57359
+ }
57360
+ exports.BDEFImplementationIn = BDEFImplementationIn;
57361
+ //# sourceMappingURL=bdef_implementation_in.js.map
57362
+
57363
+ /***/ },
57364
+
57365
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_type.js"
57366
+ /*!********************************************************************************************!*\
57367
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_type.js ***!
57368
+ \********************************************************************************************/
57369
+ (__unused_webpack_module, exports, __webpack_require__) {
57370
+
57371
+ "use strict";
57372
+
57373
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57374
+ exports.BDEFImplementationType = void 0;
57375
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57376
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57377
+ /** first statement, eg. "managed with additional save implementation in class zbp_travel unique;" */
57378
+ class BDEFImplementationType extends combi_1.Expression {
57379
+ getRunnable() {
57380
+ const extension = (0, combi_1.seq)("EXTENSION", (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("USING INTERFACE", _1.BDEFName), (0, combi_1.seq)("FOR", (0, combi_1.altPrio)("PROJECTION", "INTERFACE")))));
57381
+ const type = (0, combi_1.altPrio)("MANAGED", "UNMANAGED", "ABSTRACT", "PROJECTION", "INTERFACE", extension,
57382
+ // old syntax, eg. "implementation unmanaged;"
57383
+ (0, combi_1.seq)("IMPLEMENTATION", (0, combi_1.altPrio)("MANAGED", "UNMANAGED", "ABSTRACT", "PROJECTION")));
57384
+ const save = (0, combi_1.seq)((0, combi_1.altPrio)("WITH ADDITIONAL SAVE", "WITH UNMANAGED SAVE"), (0, combi_1.optPrio)("AND CLEANUP"), (0, combi_1.optPrio)("WITH FULL DATA"));
57385
+ const option = (0, combi_1.altPrio)(_1.BDEFImplementationIn, save);
57386
+ return (0, combi_1.seq)(type, (0, combi_1.starPrio)(option), ";");
57387
+ }
57388
+ }
57389
+ exports.BDEFImplementationType = BDEFImplementationType;
57390
+ //# sourceMappingURL=bdef_implementation_type.js.map
57391
+
57392
+ /***/ },
57393
+
57394
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_key.js"
57395
+ /*!****************************************************************************!*\
57396
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_key.js ***!
57397
+ \****************************************************************************/
57398
+ (__unused_webpack_module, exports, __webpack_require__) {
57399
+
57400
+ "use strict";
57401
+
57402
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57403
+ exports.BDEFKey = void 0;
57404
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57405
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57406
+ /** alternative key, eg. "define pure key AlternativeKey { id; }" */
57407
+ class BDEFKey extends combi_1.Expression {
57408
+ getRunnable() {
57409
+ const fields = (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFName)), ";");
57410
+ return (0, combi_1.seq)("DEFINE", (0, combi_1.optPrio)("PURE"), "KEY", _1.BDEFName, "{", (0, combi_1.starPrio)(fields), "}");
57411
+ }
57412
+ }
57413
+ exports.BDEFKey = BDEFKey;
57414
+ //# sourceMappingURL=bdef_key.js.map
57415
+
57416
+ /***/ },
57417
+
57418
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_mapping.js"
57419
+ /*!********************************************************************************!*\
57420
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_mapping.js ***!
57421
+ \********************************************************************************/
57422
+ (__unused_webpack_module, exports, __webpack_require__) {
57423
+
57424
+ "use strict";
57425
+
57426
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57427
+ exports.BDEFMapping = void 0;
57428
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57429
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57430
+ /** eg. "mapping for ztravel corresponding { TravelID = travel_id; }" */
57431
+ class BDEFMapping extends combi_1.Expression {
57432
+ getRunnable() {
57433
+ const names = (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFName)));
57434
+ const line = (0, combi_1.seq)(_1.BDEFName, "=", _1.BDEFName, (0, combi_1.optPrio)((0, combi_1.seq)("CONTROL", _1.BDEFName)), ";");
57435
+ // deep mapping of a sub node, eg. "sub _Items = items;"
57436
+ const sub = (0, combi_1.seq)("SUB", _1.BDEFName, "=", _1.BDEFName, ";");
57437
+ const body = (0, combi_1.seq)("{", (0, combi_1.starPrio)((0, combi_1.altPrio)(sub, line, ";")), "}");
57438
+ const option = (0, combi_1.altPrio)("CORRESPONDING", "EXTENSIBLE", (0, combi_1.seq)("EXCEPT", names), (0, combi_1.seq)("CONTROL", _1.BDEFName));
57439
+ return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), "MAPPING FOR", _1.BDEFName, (0, combi_1.starPrio)(option), (0, combi_1.altPrio)(";", body));
57440
+ }
57441
+ }
57442
+ exports.BDEFMapping = BDEFMapping;
57443
+ //# sourceMappingURL=bdef_mapping.js.map
57444
+
57445
+ /***/ },
57446
+
57447
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_name.js"
57448
+ /*!*****************************************************************************!*\
57449
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_name.js ***!
57450
+ \*****************************************************************************/
57451
+ (__unused_webpack_module, exports, __webpack_require__) {
57452
+
57453
+ "use strict";
57454
+
57455
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57456
+ exports.BDEFName = void 0;
57457
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57458
+ class BDEFName extends combi_1.Expression {
57459
+ getRunnable() {
57460
+ const word = (0, combi_1.regex)(/^\$?\w+$/);
57461
+ const slashName = (0, combi_1.seq)("/", (0, combi_1.regex)(/^\w+$/), "/", (0, combi_1.regex)(/^\w+$/));
57462
+ return (0, combi_1.altPrio)(slashName, word);
57463
+ }
57464
+ }
57465
+ exports.BDEFName = BDEFName;
57466
+ //# sourceMappingURL=bdef_name.js.map
57467
+
57468
+ /***/ },
57469
+
57470
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_operation.js"
57471
+ /*!**********************************************************************************!*\
57472
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_operation.js ***!
57473
+ \**********************************************************************************/
57474
+ (__unused_webpack_module, exports, __webpack_require__) {
57475
+
57476
+ "use strict";
57477
+
57478
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57479
+ exports.BDEFOperation = void 0;
57480
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57481
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57482
+ /** standard operations, eg. "internal create ( features : global );" */
57483
+ class BDEFOperation extends combi_1.Expression {
57484
+ getRunnable() {
57485
+ return (0, combi_1.seq)((0, combi_1.starPrio)((0, combi_1.altPrio)("INTERNAL", "STATIC")), (0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), (0, combi_1.optPrio)(_1.BDEFOptions), (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction));
57486
+ }
57487
+ }
57488
+ exports.BDEFOperation = BDEFOperation;
57489
+ //# sourceMappingURL=bdef_operation.js.map
57490
+
57491
+ /***/ },
57492
+
57493
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_options.js"
57494
+ /*!********************************************************************************!*\
57495
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_options.js ***!
57496
+ \********************************************************************************/
57497
+ (__unused_webpack_module, exports, __webpack_require__) {
57498
+
57499
+ "use strict";
57500
+
57501
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57502
+ exports.BDEFOptions = void 0;
57503
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57504
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57505
+ /** eg. "( features : instance, precheck )", "( read only )" or "( hierarchy-index )" */
57506
+ class BDEFOptions extends combi_1.Expression {
57507
+ getRunnable() {
57508
+ const name = (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.altPrio)((0, combi_1.seq)("-", _1.BDEFName), _1.BDEFName)));
57509
+ const option = (0, combi_1.seq)(name, (0, combi_1.optPrio)((0, combi_1.seq)(":", _1.BDEFName)));
57510
+ return (0, combi_1.seq)("(", option, (0, combi_1.starPrio)((0, combi_1.seq)(",", option)), ")");
57511
+ }
57512
+ }
57513
+ exports.BDEFOptions = BDEFOptions;
57514
+ //# sourceMappingURL=bdef_options.js.map
57515
+
57516
+ /***/ },
57517
+
57518
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_parameter.js"
57519
+ /*!**********************************************************************************!*\
57520
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_parameter.js ***!
57521
+ \**********************************************************************************/
57522
+ (__unused_webpack_module, exports, __webpack_require__) {
57523
+
57524
+ "use strict";
57525
+
57526
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57527
+ exports.BDEFParameter = void 0;
57528
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57529
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57530
+ /** eg. "deep parameter ZD_PARAMETER" */
57531
+ class BDEFParameter extends combi_1.Expression {
57532
+ getRunnable() {
57533
+ return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), "PARAMETER", _1.BDEFName);
57534
+ }
57535
+ }
57536
+ exports.BDEFParameter = BDEFParameter;
57537
+ //# sourceMappingURL=bdef_parameter.js.map
57538
+
57539
+ /***/ },
57540
+
57541
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_reference.js"
57542
+ /*!**********************************************************************************!*\
57543
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_reference.js ***!
57544
+ \**********************************************************************************/
57545
+ (__unused_webpack_module, exports, __webpack_require__) {
57546
+
57547
+ "use strict";
57548
+
57549
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57550
+ exports.BDEFReference = void 0;
57551
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57552
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57553
+ /** reference to a determination, validation or action, optionally prefixed with an entity, eg. "Child ~ validatePercentage" */
57554
+ class BDEFReference extends combi_1.Expression {
57555
+ getRunnable() {
57556
+ const namespace = (0, combi_1.seq)("/", (0, combi_1.regex)(/^\w+$/), "/");
57557
+ const tildeEnd = (0, combi_1.regex)(/^\w+~$/);
57558
+ return (0, combi_1.altPrio)((0, combi_1.seq)(_1.BDEFName, "~", _1.BDEFName), (0, combi_1.seq)(_1.BDEFName, (0, combi_1.regex)(/^~\w+$/)), (0, combi_1.seq)((0, combi_1.optPrio)(namespace), tildeEnd, _1.BDEFName), (0, combi_1.seq)((0, combi_1.optPrio)(namespace), (0, combi_1.regex)(/^\w+~\w+$/)), _1.BDEFName);
57559
+ }
57560
+ }
57561
+ exports.BDEFReference = BDEFReference;
57562
+ //# sourceMappingURL=bdef_reference.js.map
57563
+
57564
+ /***/ },
57565
+
57566
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_result.js"
57567
+ /*!*******************************************************************************!*\
57568
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_result.js ***!
57569
+ \*******************************************************************************/
57570
+ (__unused_webpack_module, exports, __webpack_require__) {
57571
+
57572
+ "use strict";
57573
+
57574
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57575
+ exports.BDEFResult = void 0;
57576
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57577
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57578
+ /** eg. "result [1] $self", "deep result ZD_RESULT" or "result selective [0..*] entity ZI_Travel" */
57579
+ class BDEFResult extends combi_1.Expression {
57580
+ getRunnable() {
57581
+ return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), "RESULT", (0, combi_1.optPrio)("SELECTIVE"), (0, combi_1.optPrio)(_1.BDEFCardinality), (0, combi_1.optPrio)("ENTITY"), _1.BDEFName);
57582
+ }
57583
+ }
57584
+ exports.BDEFResult = BDEFResult;
57585
+ //# sourceMappingURL=bdef_result.js.map
57586
+
57587
+ /***/ },
57588
+
57589
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_side_effects.js"
57590
+ /*!*************************************************************************************!*\
57591
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_side_effects.js ***!
57592
+ \*************************************************************************************/
57593
+ (__unused_webpack_module, exports, __webpack_require__) {
57594
+
57595
+ "use strict";
57596
+
57597
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57598
+ exports.BDEFSideEffects = void 0;
57599
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57600
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57601
+ /** eg. "side effects { field Price affects field TotalPrice, messages; }" */
57602
+ class BDEFSideEffects extends combi_1.Expression {
57603
+ getRunnable() {
57604
+ const fieldList = (0, combi_1.seq)("(", _1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.BDEFName)), ")");
57605
+ // eg. "field *", "field ( A, B )", "field _Item.*" or "field _Root.( A, B )"
57606
+ const field = (0, combi_1.seq)("FIELD", (0, combi_1.altPrio)("*", fieldList, (0, combi_1.seq)(_1.BDEFName, (0, combi_1.starPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)("*", fieldList, _1.BDEFName))))));
57607
+ const permission = (0, combi_1.altPrio)((0, combi_1.seq)("ACTION", _1.BDEFReference), field, (0, combi_1.seq)((0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), (0, combi_1.optPrio)(_1.BDEFName)));
57608
+ const permissions = (0, combi_1.seq)("PERMISSIONS", "(", permission, (0, combi_1.starPrio)((0, combi_1.seq)(",", permission)), ")");
57609
+ const target = (0, combi_1.altPrio)(field, (0, combi_1.seq)("ENTITY", _1.BDEFFieldPath), "MESSAGES", permissions, "$SELF");
57610
+ const targets = (0, combi_1.seq)(target, (0, combi_1.starPrio)((0, combi_1.seq)(",", target)));
57611
+ const trigger = (0, combi_1.altPrio)(field, (0, combi_1.seq)("ENTITY", _1.BDEFFieldPath), "$SELF");
57612
+ const triggers = (0, combi_1.seq)(trigger, (0, combi_1.starPrio)((0, combi_1.seq)(",", trigger)));
57613
+ const source = (0, combi_1.altPrio)(field, (0, combi_1.seq)("ACTION", _1.BDEFReference), (0, combi_1.seq)("DETERMINE ACTION", _1.BDEFReference, "EXECUTED ON", triggers), (0, combi_1.seq)("ENTITY", _1.BDEFFieldPath), (0, combi_1.seq)("EVENT", _1.BDEFName), "$SELF");
57614
+ const recommendation = (0, combi_1.seq)("RECOMMENDATION FUNCTION", _1.BDEFName, "EXECUTED ON", triggers, ";");
57615
+ const item = (0, combi_1.altPrio)((0, combi_1.seq)(source, "AFFECTS", targets, ";"), recommendation, ";");
57616
+ return (0, combi_1.seq)("SIDE EFFECTS", "{", (0, combi_1.starPrio)(item), "}");
57617
+ }
57618
+ }
57619
+ exports.BDEFSideEffects = BDEFSideEffects;
57620
+ //# sourceMappingURL=bdef_side_effects.js.map
57621
+
57622
+ /***/ },
57623
+
57624
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_string.js"
57625
+ /*!*******************************************************************************!*\
57626
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_string.js ***!
57627
+ \*******************************************************************************/
57628
+ (__unused_webpack_module, exports, __webpack_require__) {
57629
+
57630
+ "use strict";
57631
+
57632
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57633
+ exports.BDEFString = void 0;
57634
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57635
+ class BDEFString extends combi_1.Expression {
57636
+ getRunnable() {
57637
+ return (0, combi_1.regex)(/^'(?:[^']|'')*'$/);
57638
+ }
57639
+ }
57640
+ exports.BDEFString = BDEFString;
57641
+ //# sourceMappingURL=bdef_string.js.map
57642
+
57643
+ /***/ },
57644
+
57645
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_use.js"
57646
+ /*!****************************************************************************!*\
57647
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_use.js ***!
57648
+ \****************************************************************************/
57649
+ (__unused_webpack_module, exports, __webpack_require__) {
57650
+
57651
+ "use strict";
57652
+
57653
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57654
+ exports.BDEFUse = void 0;
57655
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
57656
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
57657
+ /** reuse in projections and interfaces, eg. "use action acceptTravel as accept;" */
57658
+ class BDEFUse extends combi_1.Expression {
57659
+ getRunnable() {
57660
+ const end = (0, combi_1.altPrio)(";", _1.BDEFDefaultFunction);
57661
+ const operation = (0, combi_1.seq)((0, combi_1.altPrio)("CREATE", "UPDATE", "DELETE"), (0, combi_1.optPrio)(_1.BDEFOptions), end);
57662
+ const actionTail = (0, combi_1.altPrio)((0, combi_1.seq)("AS", _1.BDEFName), (0, combi_1.seq)("EXTERNAL", _1.BDEFString), _1.BDEFParameter, _1.BDEFResult);
57663
+ const action = (0, combi_1.seq)((0, combi_1.altPrio)("ACTION", "FUNCTION"), (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.starPrio)(actionTail), end);
57664
+ const association = (0, combi_1.seq)("ASSOCIATION", (0, combi_1.optPrio)(_1.BDEFOptions), _1.BDEFName, (0, combi_1.optPrio)((0, combi_1.seq)("ABBREVIATION", _1.BDEFName)), (0, combi_1.altPrio)(";", _1.BDEFAssociationBody));
57665
+ return (0, combi_1.seq)("USE", (0, combi_1.altPrio)(operation, action, association, (0, combi_1.seq)("ETAG", ";"), (0, combi_1.seq)("SIDE EFFECTS", ";"), (0, combi_1.seq)("KEY", _1.BDEFName, ";"), (0, combi_1.seq)("EVENT", _1.BDEFName, (0, combi_1.optPrio)(_1.BDEFParameter), ";")));
57666
+ }
57667
+ }
57668
+ exports.BDEFUse = BDEFUse;
57669
+ //# sourceMappingURL=bdef_use.js.map
57670
+
57671
+ /***/ },
57672
+
57673
+ /***/ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js"
57674
+ /*!*************************************************************************!*\
57675
+ !*** ./node_modules/@abaplint/core/build/src/bdef/expressions/index.js ***!
57676
+ \*************************************************************************/
57677
+ (__unused_webpack_module, exports, __webpack_require__) {
57678
+
57679
+ "use strict";
57680
+
57681
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
57682
+ if (k2 === undefined) k2 = k;
57683
+ var desc = Object.getOwnPropertyDescriptor(m, k);
57684
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
57685
+ desc = { enumerable: true, get: function() { return m[k]; } };
57686
+ }
57687
+ Object.defineProperty(o, k2, desc);
57688
+ }) : (function(o, m, k, k2) {
57689
+ if (k2 === undefined) k2 = k;
57690
+ o[k2] = m[k];
57691
+ }));
57692
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
57693
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
57694
+ };
57695
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
57696
+ __exportStar(__webpack_require__(/*! ./bdef_action */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_action.js"), exports);
57697
+ __exportStar(__webpack_require__(/*! ./bdef_alias */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_alias.js"), exports);
57698
+ __exportStar(__webpack_require__(/*! ./bdef_association_body */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association_body.js"), exports);
57699
+ __exportStar(__webpack_require__(/*! ./bdef_association */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_association.js"), exports);
57700
+ __exportStar(__webpack_require__(/*! ./bdef_authorization_context */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_authorization_context.js"), exports);
57701
+ __exportStar(__webpack_require__(/*! ./bdef_cardinality */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_cardinality.js"), exports);
57702
+ __exportStar(__webpack_require__(/*! ./bdef_default_function */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_default_function.js"), exports);
57703
+ __exportStar(__webpack_require__(/*! ./bdef_define_behavior */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_define_behavior.js"), exports);
57704
+ __exportStar(__webpack_require__(/*! ./bdef_definition */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_definition.js"), exports);
57705
+ __exportStar(__webpack_require__(/*! ./bdef_determination */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determination.js"), exports);
57706
+ __exportStar(__webpack_require__(/*! ./bdef_determine_action */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_determine_action.js"), exports);
57707
+ __exportStar(__webpack_require__(/*! ./bdef_event */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_event.js"), exports);
57708
+ __exportStar(__webpack_require__(/*! ./bdef_field_path */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field_path.js"), exports);
57709
+ __exportStar(__webpack_require__(/*! ./bdef_field */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_field.js"), exports);
57710
+ __exportStar(__webpack_require__(/*! ./bdef_header */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_header.js"), exports);
57711
+ __exportStar(__webpack_require__(/*! ./bdef_hierarchy */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_hierarchy.js"), exports);
57712
+ __exportStar(__webpack_require__(/*! ./bdef_implementation_in */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_in.js"), exports);
57713
+ __exportStar(__webpack_require__(/*! ./bdef_implementation_type */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_implementation_type.js"), exports);
57714
+ __exportStar(__webpack_require__(/*! ./bdef_key */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_key.js"), exports);
57715
+ __exportStar(__webpack_require__(/*! ./bdef_mapping */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_mapping.js"), exports);
57716
+ __exportStar(__webpack_require__(/*! ./bdef_name */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_name.js"), exports);
57717
+ __exportStar(__webpack_require__(/*! ./bdef_operation */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_operation.js"), exports);
57718
+ __exportStar(__webpack_require__(/*! ./bdef_options */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_options.js"), exports);
57719
+ __exportStar(__webpack_require__(/*! ./bdef_parameter */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_parameter.js"), exports);
57720
+ __exportStar(__webpack_require__(/*! ./bdef_reference */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_reference.js"), exports);
57721
+ __exportStar(__webpack_require__(/*! ./bdef_result */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_result.js"), exports);
57722
+ __exportStar(__webpack_require__(/*! ./bdef_side_effects */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_side_effects.js"), exports);
57723
+ __exportStar(__webpack_require__(/*! ./bdef_string */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_string.js"), exports);
57724
+ __exportStar(__webpack_require__(/*! ./bdef_use */ "./node_modules/@abaplint/core/build/src/bdef/expressions/bdef_use.js"), exports);
57725
+ //# sourceMappingURL=index.js.map
57726
+
57727
+ /***/ },
57728
+
56647
57729
  /***/ "./node_modules/@abaplint/core/build/src/cds/cds_determine_types.js"
56648
57730
  /*!**************************************************************************!*\
56649
57731
  !*** ./node_modules/@abaplint/core/build/src/cds/cds_determine_types.js ***!
@@ -64286,6 +65368,8 @@ exports.BADIDefinition = BADIDefinition;
64286
65368
 
64287
65369
  Object.defineProperty(exports, "__esModule", ({ value: true }));
64288
65370
  exports.BehaviorDefinition = void 0;
65371
+ const bdef_parser_1 = __webpack_require__(/*! ../bdef/bdef_parser */ "./node_modules/@abaplint/core/build/src/bdef/bdef_parser.js");
65372
+ const expressions_1 = __webpack_require__(/*! ../bdef/expressions */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
64289
65373
  const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
64290
65374
  class BehaviorDefinition extends _abstract_object_1.AbstractObject {
64291
65375
  constructor() {
@@ -64308,8 +65392,30 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
64308
65392
  findSourceFile() {
64309
65393
  return this.getFiles().find(f => f.getFilename().endsWith(".asbdef"));
64310
65394
  }
65395
+ parse() {
65396
+ if (this.isDirty() === false && this.parsedData !== undefined) {
65397
+ return { updated: false, runtime: 0 };
65398
+ }
65399
+ const start = Date.now();
65400
+ const tree = new bdef_parser_1.BDEFParser().parse(this.findSourceFile());
65401
+ this.parsedData = {
65402
+ entities: tree ? this.findEntities(tree) : this.findEntitiesFallback(),
65403
+ tree,
65404
+ };
65405
+ this.dirty = false;
65406
+ return { updated: true, runtime: Date.now() - start };
65407
+ }
65408
+ getTree() {
65409
+ var _a;
65410
+ this.parse();
65411
+ return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.tree;
65412
+ }
65413
+ hasParserError() {
65414
+ return this.findSourceFile() !== undefined && this.getTree() === undefined;
65415
+ }
64311
65416
  listEntities() {
64312
- return this.parseSource().entities;
65417
+ this.parse();
65418
+ return this.parsedData.entities;
64313
65419
  }
64314
65420
  /** finds the entity name for a given alias, undefined if the alias is not defined */
64315
65421
  findEntityNameByAlias(alias) {
@@ -64323,15 +65429,29 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
64323
65429
  return undefined;
64324
65430
  }
64325
65431
  /////////////////////////
64326
- parseSource() {
65432
+ findEntities(tree) {
64327
65433
  var _a;
64328
- if (this.parsedData !== undefined) {
64329
- return this.parsedData;
65434
+ const ret = [];
65435
+ for (const define of tree.findDirectExpressions(expressions_1.BDEFDefineBehavior)) {
65436
+ const name = define.findDirectExpression(expressions_1.BDEFName);
65437
+ if (name === undefined) {
65438
+ continue;
65439
+ }
65440
+ const alias = (_a = define.findDirectExpression(expressions_1.BDEFAlias)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.BDEFName);
65441
+ ret.push({
65442
+ name: name.concatTokens().replace(/ /g, ""),
65443
+ alias: alias === null || alias === void 0 ? void 0 : alias.concatTokens().replace(/ /g, ""),
65444
+ });
64330
65445
  }
64331
- this.parsedData = { entities: [] };
65446
+ return ret;
65447
+ }
65448
+ /** used if the source cannot be parsed */
65449
+ findEntitiesFallback() {
65450
+ var _a;
65451
+ const ret = [];
64332
65452
  const raw = (_a = this.findSourceFile()) === null || _a === void 0 ? void 0 : _a.getRaw();
64333
65453
  if (raw === undefined) {
64334
- return this.parsedData;
65454
+ return ret;
64335
65455
  }
64336
65456
  // BDEF uses "//" for line comments
64337
65457
  const stripped = raw.replace(/\/\/.*$/gm, "");
@@ -64339,10 +65459,10 @@ class BehaviorDefinition extends _abstract_object_1.AbstractObject {
64339
65459
  const regex = /\bdefine\s+(?:\w+\s+)*?behavior\s+for\s+([\w/]+)(?:\s+alias\s+(\w+))?/gi;
64340
65460
  let match = regex.exec(stripped);
64341
65461
  while (match !== null) {
64342
- this.parsedData.entities.push({ name: match[1], alias: match[2] });
65462
+ ret.push({ name: match[1], alias: match[2] });
64343
65463
  match = regex.exec(stripped);
64344
65464
  }
64345
- return this.parsedData;
65465
+ return ret;
64346
65466
  }
64347
65467
  }
64348
65468
  exports.BehaviorDefinition = BehaviorDefinition;
@@ -72606,7 +73726,7 @@ class Registry {
72606
73726
  }
72607
73727
  static abaplintVersion() {
72608
73728
  // magic, see build script "version.js"
72609
- return "2.120.83";
73729
+ return "2.120.87";
72610
73730
  }
72611
73731
  getDDICReferences() {
72612
73732
  return this.ddicReferences;
@@ -75263,6 +76383,104 @@ exports.AbapdocParameterNames = AbapdocParameterNames;
75263
76383
 
75264
76384
  /***/ },
75265
76385
 
76386
+ /***/ "./node_modules/@abaplint/core/build/src/rules/abapdoc_shorttext_length.js"
76387
+ /*!*********************************************************************************!*\
76388
+ !*** ./node_modules/@abaplint/core/build/src/rules/abapdoc_shorttext_length.js ***!
76389
+ \*********************************************************************************/
76390
+ (__unused_webpack_module, exports, __webpack_require__) {
76391
+
76392
+ "use strict";
76393
+
76394
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
76395
+ exports.AbapdocShorttextLength = exports.AbapdocShorttextLengthConf = void 0;
76396
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
76397
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
76398
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
76399
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
76400
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
76401
+ class AbapdocShorttextLengthConf extends _basic_rule_config_1.BasicRuleConfig {
76402
+ }
76403
+ exports.AbapdocShorttextLengthConf = AbapdocShorttextLengthConf;
76404
+ const MAX_LENGTH = 60;
76405
+ class AbapdocShorttextLength extends _abap_rule_1.ABAPRule {
76406
+ constructor() {
76407
+ super(...arguments);
76408
+ this.conf = new AbapdocShorttextLengthConf();
76409
+ }
76410
+ getMetadata() {
76411
+ return {
76412
+ key: "abapdoc_shorttext_length",
76413
+ title: "ABAP Doc shorttext too long",
76414
+ shortDescription: `Reports ABAP Doc shorttexts longer than 60 characters.`,
76415
+ extendedInformation: `A shorttext is written as <p class="shorttext">...</p> or
76416
+ <p class="shorttext synchronized">...</p>, the system warns "Shorttext must not exceed 60 characters."
76417
+ if the text is longer.
76418
+
76419
+ The text may span several "! lines, line breaks count as one blank. Leading and trailing blanks are not counted,
76420
+ an entity like &lt; counts as one character.`,
76421
+ tags: [_irule_1.RuleTag.SingleFile],
76422
+ badExample: `INTERFACE zif_foo PUBLIC.
76423
+ "! <p class="shorttext synchronized">Returns the name of the selected row in the table of the view</p>
76424
+ METHODS name RETURNING VALUE(result) TYPE string.
76425
+ ENDINTERFACE.`,
76426
+ goodExample: `INTERFACE zif_foo PUBLIC.
76427
+ "! <p class="shorttext synchronized">Returns the name of the selected row</p>
76428
+ METHODS name RETURNING VALUE(result) TYPE string.
76429
+ ENDINTERFACE.`,
76430
+ };
76431
+ }
76432
+ getConfig() {
76433
+ return this.conf;
76434
+ }
76435
+ setConfig(conf) {
76436
+ this.conf = conf;
76437
+ }
76438
+ runParsed(file) {
76439
+ const issues = [];
76440
+ let block = [];
76441
+ for (const statement of file.getStatements()) {
76442
+ const token = statement.getFirstToken();
76443
+ const doc = statement.get() instanceof _statement_1.Comment && token.getStr().startsWith(`"!`);
76444
+ const previous = block[block.length - 1];
76445
+ if (doc === false || (previous !== undefined && token.getStart().getRow() !== previous.getStart().getRow() + 1)) {
76446
+ issues.push(...this.checkBlock(file, block));
76447
+ block = [];
76448
+ }
76449
+ if (doc === true) {
76450
+ block.push(token);
76451
+ }
76452
+ }
76453
+ issues.push(...this.checkBlock(file, block));
76454
+ return issues;
76455
+ }
76456
+ checkBlock(file, block) {
76457
+ const issues = [];
76458
+ if (block.length === 0) {
76459
+ return issues;
76460
+ }
76461
+ const text = block.map(t => t.getStr().substring(2)).join("\n");
76462
+ const regex = /<p\s[^>]*class\s*=\s*"shorttext(?:\s+synchronized)?"[^>]*>([\s\S]*?)<\/p>/gi;
76463
+ let match;
76464
+ while ((match = regex.exec(text)) !== null) {
76465
+ const length = this.decode(match[1].replace(/\s+/g, " ").trim()).length;
76466
+ if (length <= MAX_LENGTH) {
76467
+ continue;
76468
+ }
76469
+ const token = block[text.substring(0, match.index).split("\n").length - 1];
76470
+ const message = `Shorttext must not exceed ${MAX_LENGTH} characters, found ${length}`;
76471
+ issues.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity));
76472
+ }
76473
+ return issues;
76474
+ }
76475
+ decode(text) {
76476
+ return text.replace(/&(#\d+|#x[0-9a-fA-F]+|[a-zA-Z]+);/g, "_");
76477
+ }
76478
+ }
76479
+ exports.AbapdocShorttextLength = AbapdocShorttextLength;
76480
+ //# sourceMappingURL=abapdoc_shorttext_length.js.map
76481
+
76482
+ /***/ },
76483
+
75266
76484
  /***/ "./node_modules/@abaplint/core/build/src/rules/add_test_attributes.js"
75267
76485
  /*!****************************************************************************!*\
75268
76486
  !*** ./node_modules/@abaplint/core/build/src/rules/add_test_attributes.js ***!
@@ -76165,6 +77383,7 @@ const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/ex
76165
77383
  const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
76166
77384
  const Structures = __importStar(__webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js"));
76167
77385
  const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
77386
+ const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
76168
77387
  class AlignTypeExpressionsConf extends _basic_rule_config_1.BasicRuleConfig {
76169
77388
  constructor() {
76170
77389
  super(...arguments);
@@ -76332,12 +77551,18 @@ ENDINTERFACE.`,
76332
77551
  let column = 0;
76333
77552
  const st = t.findDirectStatements(Statements.Type);
76334
77553
  for (const s of st) {
76335
- const name = s.getChildren()[1];
77554
+ const children = s.getChildren();
77555
+ const length = s.findDirectExpression(Expressions.ConstantFieldLength);
77556
+ const nameEnd = (length !== null && length !== void 0 ? length : children[1]).getLastToken().getEnd();
77557
+ const after = children[length ? 3 : 2];
77558
+ if (after === undefined || after.getFirstToken() instanceof tokens_1.Punctuation) {
77559
+ continue; // no TYPE clause, eg. "foo(1)," with implicit type
77560
+ }
76336
77561
  fields.push({
76337
- nameEnd: name.getLastToken().getEnd(),
76338
- after: s.getChildren()[2].getFirstToken().getStart()
77562
+ nameEnd: nameEnd,
77563
+ after: after.getFirstToken().getStart()
76339
77564
  });
76340
- column = Math.max(column, name.getFirstToken().getEnd().getCol() + 1);
77565
+ column = Math.max(column, nameEnd.getCol() + 1);
76341
77566
  }
76342
77567
  issues.push(...this.check(fields, column, file));
76343
77568
  }
@@ -76716,8 +77941,28 @@ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md
76716
77941
 
76717
77942
  BREAK points`,
76718
77943
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
76719
- badExample: `DESCRIBE TABLE items LINES count.`,
76720
- goodExample: `count = lines( items ).`,
77944
+ badExample: `DEFINE _hello.
77945
+ WRITE 'hello'.
77946
+ END-OF-DEFINITION.
77947
+
77948
+ STATICS count TYPE i.
77949
+
77950
+ TYPES ty_items TYPE STANDARD TABLE OF i WITH DEFAULT KEY.
77951
+
77952
+ BREAK-POINT.
77953
+
77954
+ TEST-SEAM seam_name.
77955
+ count = 1.
77956
+ END-TEST-SEAM.
77957
+
77958
+ DESCRIBE TABLE items LINES count.
77959
+
77960
+ EXPORT data = items TO MEMORY ID 'ZFOO'.
77961
+
77962
+ EXPORT data = items TO DATABASE indx(zz) ID 'ZFOO'.`,
77963
+ goodExample: `count = lines( items ).
77964
+
77965
+ TYPES ty_items TYPE STANDARD TABLE OF i WITH EMPTY KEY.`,
76721
77966
  };
76722
77967
  }
76723
77968
  getDescription(statement) {
@@ -76814,6 +78059,161 @@ exports.AvoidUse = AvoidUse;
76814
78059
 
76815
78060
  /***/ },
76816
78061
 
78062
+ /***/ "./node_modules/@abaplint/core/build/src/rules/bdef_check_syntax.js"
78063
+ /*!**************************************************************************!*\
78064
+ !*** ./node_modules/@abaplint/core/build/src/rules/bdef_check_syntax.js ***!
78065
+ \**************************************************************************/
78066
+ (__unused_webpack_module, exports, __webpack_require__) {
78067
+
78068
+ "use strict";
78069
+
78070
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
78071
+ exports.BDEFCheckSyntax = exports.BDEFCheckSyntaxConf = void 0;
78072
+ const expressions_1 = __webpack_require__(/*! ../bdef/expressions */ "./node_modules/@abaplint/core/build/src/bdef/expressions/index.js");
78073
+ const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
78074
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
78075
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
78076
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
78077
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
78078
+ class BDEFCheckSyntaxConf extends _basic_rule_config_1.BasicRuleConfig {
78079
+ }
78080
+ exports.BDEFCheckSyntaxConf = BDEFCheckSyntaxConf;
78081
+ class BDEFCheckSyntax {
78082
+ constructor() {
78083
+ this.conf = new BDEFCheckSyntaxConf();
78084
+ }
78085
+ getMetadata() {
78086
+ return {
78087
+ key: "bdef_check_syntax",
78088
+ title: "BDEF Check Syntax",
78089
+ shortDescription: "Checks behavior definition references to entities and implementation classes",
78090
+ extendedInformation: `Performs semantic checks which require other objects to be available.
78091
+
78092
+ Missing objects are only reported when their names match the configured errorNamespace.`,
78093
+ tags: [_irule_1.RuleTag.Syntax],
78094
+ };
78095
+ }
78096
+ getConfig() {
78097
+ return this.conf;
78098
+ }
78099
+ setConfig(conf) {
78100
+ this.conf = conf;
78101
+ }
78102
+ initialize(reg) {
78103
+ this.reg = reg;
78104
+ return this;
78105
+ }
78106
+ run(object) {
78107
+ if (!(object instanceof objects_1.BehaviorDefinition)) {
78108
+ return [];
78109
+ }
78110
+ const tree = object.getTree();
78111
+ const file = object.findSourceFile();
78112
+ if (tree === undefined || file === undefined) {
78113
+ return [];
78114
+ }
78115
+ const issues = [];
78116
+ this.checkImplementationClasses(tree, issues, file);
78117
+ this.checkEntities(tree, issues, file);
78118
+ return issues;
78119
+ }
78120
+ checkImplementationClasses(tree, issues, file) {
78121
+ for (const implementation of tree.findAllExpressions(expressions_1.BDEFImplementationIn)) {
78122
+ const nameNode = implementation.findDirectExpression(expressions_1.BDEFName);
78123
+ if (nameNode === undefined) {
78124
+ continue;
78125
+ }
78126
+ const name = this.name(nameNode);
78127
+ if (this.reg.getObject("CLAS", name) === undefined && this.reg.inErrorNamespace(name)) {
78128
+ issues.push(issue_1.Issue.atToken(file, nameNode.getFirstToken(), `Implementation class "${name}" not found`, this.getMetadata().key, this.conf.severity));
78129
+ }
78130
+ }
78131
+ }
78132
+ checkEntities(tree, issues, file) {
78133
+ const ddic = new ddic_1.DDIC(this.reg);
78134
+ for (const define of tree.findDirectExpressions(expressions_1.BDEFDefineBehavior)) {
78135
+ if (define.getFirstToken().getStr().toUpperCase() !== "DEFINE") {
78136
+ // "extend behavior for" refers to entities of the extended BDEF
78137
+ continue;
78138
+ }
78139
+ const nameNode = define.findDirectExpression(expressions_1.BDEFName);
78140
+ if (nameNode === undefined) {
78141
+ continue;
78142
+ }
78143
+ const name = this.name(nameNode);
78144
+ if (this.reg.inErrorNamespace(name)
78145
+ && this.reg.getObject("DDLS", name) === undefined
78146
+ && ddic.lookupDDLS(name) === undefined) {
78147
+ issues.push(issue_1.Issue.atToken(file, nameNode.getFirstToken(), `Entity "${name}" not found`, this.getMetadata().key, this.conf.severity));
78148
+ }
78149
+ }
78150
+ }
78151
+ name(node) {
78152
+ return node.concatTokens().replace(/ /g, "");
78153
+ }
78154
+ }
78155
+ exports.BDEFCheckSyntax = BDEFCheckSyntax;
78156
+ //# sourceMappingURL=bdef_check_syntax.js.map
78157
+
78158
+ /***/ },
78159
+
78160
+ /***/ "./node_modules/@abaplint/core/build/src/rules/bdef_parser_error.js"
78161
+ /*!**************************************************************************!*\
78162
+ !*** ./node_modules/@abaplint/core/build/src/rules/bdef_parser_error.js ***!
78163
+ \**************************************************************************/
78164
+ (__unused_webpack_module, exports, __webpack_require__) {
78165
+
78166
+ "use strict";
78167
+
78168
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
78169
+ exports.BDEFParserError = exports.BDEFParserErrorConf = void 0;
78170
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
78171
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
78172
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
78173
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
78174
+ class BDEFParserErrorConf extends _basic_rule_config_1.BasicRuleConfig {
78175
+ }
78176
+ exports.BDEFParserErrorConf = BDEFParserErrorConf;
78177
+ class BDEFParserError {
78178
+ constructor() {
78179
+ this.conf = new BDEFParserErrorConf();
78180
+ }
78181
+ getMetadata() {
78182
+ return {
78183
+ key: "bdef_parser_error",
78184
+ title: "BDEF Parser Error",
78185
+ shortDescription: `BDEF parsing`,
78186
+ extendedInformation: `Parses behavior definitions and issues parser errors`,
78187
+ tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
78188
+ };
78189
+ }
78190
+ getConfig() {
78191
+ return this.conf;
78192
+ }
78193
+ setConfig(conf) {
78194
+ this.conf = conf;
78195
+ }
78196
+ initialize(_reg) {
78197
+ return this;
78198
+ }
78199
+ run(object) {
78200
+ const issues = [];
78201
+ if (object instanceof objects_1.BehaviorDefinition) {
78202
+ const file = object.findSourceFile();
78203
+ if (object.hasParserError() === true && file) {
78204
+ const empty = file.getRaw().length === 0 ? ", empty file" : "";
78205
+ const message = "BDEF Parser error" + empty;
78206
+ issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.getConfig().severity));
78207
+ }
78208
+ }
78209
+ return issues;
78210
+ }
78211
+ }
78212
+ exports.BDEFParserError = BDEFParserError;
78213
+ //# sourceMappingURL=bdef_parser_error.js.map
78214
+
78215
+ /***/ },
78216
+
76817
78217
  /***/ "./node_modules/@abaplint/core/build/src/rules/begin_end_names.js"
76818
78218
  /*!************************************************************************!*\
76819
78219
  !*** ./node_modules/@abaplint/core/build/src/rules/begin_end_names.js ***!
@@ -84108,6 +85508,17 @@ Make sure to test the downported code, it might not always be completely correct
84108
85508
  }
84109
85509
  }
84110
85510
  }
85511
+ // INSERT with a 702 built-in function as the operand parses in the low version, but 702
85512
+ // reads the function as a method call, "Method SUBSTRING does not exist"
85513
+ if (ret.length === 0) {
85514
+ for (let i = 0; i < lowStatements.length; i++) {
85515
+ const issue = this.outlineInsertBuiltin(lowStatements[i], highStatements[i], lowFile, highSyntax);
85516
+ if (issue) {
85517
+ ret.push(issue);
85518
+ break;
85519
+ }
85520
+ }
85521
+ }
84111
85522
  // INTO after WHERE parses as a valid SELECT in the low version, but is only allowed in
84112
85523
  // strict SQL syntax, so move it also when the statement is no longer Unknown
84113
85524
  if (ret.length === 0) {
@@ -84940,6 +86351,40 @@ ${indentation}`);
84940
86351
  }
84941
86352
  return undefined;
84942
86353
  }
86354
+ /** INSERT substring( ... ) INTO TABLE tab, the operand is outlined into a variable */
86355
+ outlineInsertBuiltin(low, high, lowFile, highSyntax) {
86356
+ var _a;
86357
+ if (!(high.get() instanceof Statements.InsertInternal)) {
86358
+ return undefined;
86359
+ }
86360
+ else if (this.lowReg.getConfig().isOpenABAP()) {
86361
+ return undefined;
86362
+ }
86363
+ else if (low.getFirstToken().getStart() instanceof virtual_position_1.VirtualPosition) {
86364
+ return undefined;
86365
+ }
86366
+ // the whole operand is the call, a longer expression is outlined by replaceInsertExpression
86367
+ const source = high.getChildren()[1];
86368
+ if (!(source instanceof nodes_1.ExpressionNode)
86369
+ || !(source.get() instanceof Expressions.SimpleSource4 || source.get() instanceof Expressions.Source)
86370
+ || source.getChildren().length !== 1
86371
+ || !(((_a = source.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.MethodCallChain)) {
86372
+ return undefined;
86373
+ }
86374
+ const type = this.builtinReturnType(source, lowFile, highSyntax);
86375
+ if (type === undefined) {
86376
+ return undefined;
86377
+ }
86378
+ const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
86379
+ const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
86380
+ const code = `DATA ${uniqueName} TYPE ${type}.\n` +
86381
+ indentation + `${uniqueName} = ${source.concatTokens()}.\n` +
86382
+ indentation;
86383
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), code);
86384
+ const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
86385
+ const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
86386
+ return issue_1.Issue.atToken(lowFile, source.getFirstToken(), "Outline built-in function in INSERT", this.getMetadata().key, this.conf.severity, fix);
86387
+ }
84943
86388
  /** the ABAP type returned by the built-in function this Source starts with, or undefined
84944
86389
  * if it does not start with one, or with one that predates 702 */
84945
86390
  builtinReturnType(source, lowFile, highSyntax) {
@@ -91515,6 +92960,7 @@ __exportStar(__webpack_require__(/*! ./abapdoc */ "./node_modules/@abaplint/core
91515
92960
  __exportStar(__webpack_require__(/*! ./abapdoc_html_tag */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_html_tag.js"), exports);
91516
92961
  __exportStar(__webpack_require__(/*! ./abapdoc_leading_at */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_leading_at.js"), exports);
91517
92962
  __exportStar(__webpack_require__(/*! ./abapdoc_parameter_names */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_parameter_names.js"), exports);
92963
+ __exportStar(__webpack_require__(/*! ./abapdoc_shorttext_length */ "./node_modules/@abaplint/core/build/src/rules/abapdoc_shorttext_length.js"), exports);
91518
92964
  __exportStar(__webpack_require__(/*! ./add_test_attributes */ "./node_modules/@abaplint/core/build/src/rules/add_test_attributes.js"), exports);
91519
92965
  __exportStar(__webpack_require__(/*! ./aff_and_xml */ "./node_modules/@abaplint/core/build/src/rules/aff_and_xml.js"), exports);
91520
92966
  __exportStar(__webpack_require__(/*! ./alias_never_reassigned */ "./node_modules/@abaplint/core/build/src/rules/alias_never_reassigned.js"), exports);
@@ -91525,6 +92971,8 @@ __exportStar(__webpack_require__(/*! ./allowed_object_naming */ "./node_modules/
91525
92971
  __exportStar(__webpack_require__(/*! ./allowed_object_types */ "./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js"), exports);
91526
92972
  __exportStar(__webpack_require__(/*! ./ambiguous_statement */ "./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js"), exports);
91527
92973
  __exportStar(__webpack_require__(/*! ./avoid_use */ "./node_modules/@abaplint/core/build/src/rules/avoid_use.js"), exports);
92974
+ __exportStar(__webpack_require__(/*! ./bdef_check_syntax */ "./node_modules/@abaplint/core/build/src/rules/bdef_check_syntax.js"), exports);
92975
+ __exportStar(__webpack_require__(/*! ./bdef_parser_error */ "./node_modules/@abaplint/core/build/src/rules/bdef_parser_error.js"), exports);
91528
92976
  __exportStar(__webpack_require__(/*! ./begin_end_names */ "./node_modules/@abaplint/core/build/src/rules/begin_end_names.js"), exports);
91529
92977
  __exportStar(__webpack_require__(/*! ./begin_single_include */ "./node_modules/@abaplint/core/build/src/rules/begin_single_include.js"), exports);
91530
92978
  __exportStar(__webpack_require__(/*! ./boolean_flag_via_if */ "./node_modules/@abaplint/core/build/src/rules/boolean_flag_via_if.js"), exports);
@@ -91667,6 +93115,7 @@ __exportStar(__webpack_require__(/*! ./prefer_pragmas */ "./node_modules/@abapli
91667
93115
  __exportStar(__webpack_require__(/*! ./prefer_abap_bool */ "./node_modules/@abaplint/core/build/src/rules/prefer_abap_bool.js"), exports);
91668
93116
  __exportStar(__webpack_require__(/*! ./prefer_abap_bool_values */ "./node_modules/@abaplint/core/build/src/rules/prefer_abap_bool_values.js"), exports);
91669
93117
  __exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js"), exports);
93118
+ __exportStar(__webpack_require__(/*! ./prefer_raise_message */ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_message.js"), exports);
91670
93119
  __exportStar(__webpack_require__(/*! ./prefer_string_template */ "./node_modules/@abaplint/core/build/src/rules/prefer_string_template.js"), exports);
91671
93120
  __exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ "./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js"), exports);
91672
93121
  __exportStar(__webpack_require__(/*! ./prefer_xsdbool */ "./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js"), exports);
@@ -101102,6 +102551,134 @@ exports.PreferRaiseExceptionNew = PreferRaiseExceptionNew;
101102
102551
 
101103
102552
  /***/ },
101104
102553
 
102554
+ /***/ "./node_modules/@abaplint/core/build/src/rules/prefer_raise_message.js"
102555
+ /*!*****************************************************************************!*\
102556
+ !*** ./node_modules/@abaplint/core/build/src/rules/prefer_raise_message.js ***!
102557
+ \*****************************************************************************/
102558
+ (__unused_webpack_module, exports, __webpack_require__) {
102559
+
102560
+ "use strict";
102561
+
102562
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
102563
+ if (k2 === undefined) k2 = k;
102564
+ var desc = Object.getOwnPropertyDescriptor(m, k);
102565
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
102566
+ desc = { enumerable: true, get: function() { return m[k]; } };
102567
+ }
102568
+ Object.defineProperty(o, k2, desc);
102569
+ }) : (function(o, m, k, k2) {
102570
+ if (k2 === undefined) k2 = k;
102571
+ o[k2] = m[k];
102572
+ }));
102573
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
102574
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
102575
+ }) : function(o, v) {
102576
+ o["default"] = v;
102577
+ });
102578
+ var __importStar = (this && this.__importStar) || (function () {
102579
+ var ownKeys = function(o) {
102580
+ ownKeys = Object.getOwnPropertyNames || function (o) {
102581
+ var ar = [];
102582
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
102583
+ return ar;
102584
+ };
102585
+ return ownKeys(o);
102586
+ };
102587
+ return function (mod) {
102588
+ if (mod && mod.__esModule) return mod;
102589
+ var result = {};
102590
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
102591
+ __setModuleDefault(result, mod);
102592
+ return result;
102593
+ };
102594
+ })();
102595
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
102596
+ exports.PreferRaiseMessage = exports.PreferRaiseMessageConf = void 0;
102597
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
102598
+ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
102599
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
102600
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
102601
+ const Statements = __importStar(__webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js"));
102602
+ const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js"));
102603
+ class PreferRaiseMessageConf extends _basic_rule_config_1.BasicRuleConfig {
102604
+ constructor() {
102605
+ super(...arguments);
102606
+ /** List of exception class names to ignore, case insensitive */
102607
+ this.ignoreExceptionClasses = [];
102608
+ }
102609
+ }
102610
+ exports.PreferRaiseMessageConf = PreferRaiseMessageConf;
102611
+ class PreferRaiseMessage extends _abap_rule_1.ABAPRule {
102612
+ constructor() {
102613
+ super(...arguments);
102614
+ this.conf = new PreferRaiseMessageConf();
102615
+ }
102616
+ getMetadata() {
102617
+ return {
102618
+ key: "prefer_raise_message",
102619
+ title: "Prefer RAISE EXCEPTION with MESSAGE",
102620
+ shortDescription: `Prefer RAISE EXCEPTION with MESSAGE instead of supplying parameter TEXT or TEXTID`,
102621
+ extendedInformation: `Reports RAISE EXCEPTION statements where parameter TEXT or TEXTID is supplied.
102622
+
102623
+ Use a message class instead, so the text is translatable and can be found via where-used.
102624
+
102625
+ Exception classes can be excluded via configuration "ignoreExceptionClasses".`,
102626
+ tags: [_irule_1.RuleTag.SingleFile],
102627
+ goodExample: `RAISE EXCEPTION TYPE zcx_error MESSAGE e001(zclass).`,
102628
+ badExample: `RAISE EXCEPTION TYPE zcx_error
102629
+ EXPORTING text = 'hello world'.`,
102630
+ };
102631
+ }
102632
+ getConfig() {
102633
+ return this.conf;
102634
+ }
102635
+ setConfig(conf) {
102636
+ this.conf = conf;
102637
+ }
102638
+ runParsed(file) {
102639
+ var _a, _b, _c, _d;
102640
+ var _e;
102641
+ const issues = [];
102642
+ const ignore = ((_e = this.conf.ignoreExceptionClasses) !== null && _e !== void 0 ? _e : []).map(c => c.toUpperCase());
102643
+ for (const statement of file.getStatements()) {
102644
+ if (!(statement.get() instanceof Statements.Raise)) {
102645
+ continue;
102646
+ }
102647
+ const concat = statement.concatTokens().toUpperCase();
102648
+ if (!concat.startsWith("RAISE EXCEPTION ") && !concat.startsWith("RAISE RESUMABLE EXCEPTION ")) {
102649
+ continue;
102650
+ }
102651
+ else if (concat.includes(" MESSAGE")) {
102652
+ continue;
102653
+ }
102654
+ let className;
102655
+ let parameters;
102656
+ const newObject = (_b = (_a = statement.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.MethodCallChain)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.NewObject);
102657
+ if (newObject) {
102658
+ className = (_c = newObject.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _c === void 0 ? void 0 : _c.concatTokens();
102659
+ parameters = newObject.findDirectExpression(Expressions.ParameterListS);
102660
+ }
102661
+ else {
102662
+ className = (_d = statement.findDirectExpression(Expressions.ClassName)) === null || _d === void 0 ? void 0 : _d.concatTokens();
102663
+ parameters = statement.findDirectExpression(Expressions.ParameterListS);
102664
+ }
102665
+ if (className === undefined || ignore.includes(className.toUpperCase())) {
102666
+ continue;
102667
+ }
102668
+ const name = parameters === null || parameters === void 0 ? void 0 : parameters.findDirectExpressions(Expressions.ParameterS).map(p => { var _a; return (_a = p.findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase(); }).find(n => n === "TEXT" || n === "TEXTID");
102669
+ if (name) {
102670
+ const message = "Prefer RAISE EXCEPTION with MESSAGE, " + className + " raised with parameter " + name;
102671
+ issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
102672
+ }
102673
+ }
102674
+ return issues;
102675
+ }
102676
+ }
102677
+ exports.PreferRaiseMessage = PreferRaiseMessage;
102678
+ //# sourceMappingURL=prefer_raise_message.js.map
102679
+
102680
+ /***/ },
102681
+
101105
102682
  /***/ "./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js"
101106
102683
  /*!**************************************************************************************!*\
101107
102684
  !*** ./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js ***!
@@ -114110,6 +115687,7 @@ exports.PopulateTables = PopulateTables;
114110
115687
 
114111
115688
  Object.defineProperty(exports, "__esModule", ({ value: true }));
114112
115689
  exports.DatabaseSchemaReuse = void 0;
115690
+ const OPERATORS = { EQ: "=", NE: "<>", LT: "<", LE: "<=", GT: ">", GE: ">=" };
114113
115691
  class DatabaseSchemaReuse {
114114
115692
  myQuote;
114115
115693
  constructor(quote) {
@@ -114119,31 +115697,68 @@ class DatabaseSchemaReuse {
114119
115697
  return this.myQuote + name.toLowerCase() + this.myQuote;
114120
115698
  }
114121
115699
  buildVIEW(view) {
114122
- const fields = view.getFields();
114123
- let firstTabname = "";
114124
- const columns = fields?.map((f) => {
114125
- firstTabname = this.quote(f.TABNAME.toLowerCase());
114126
- return firstTabname + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase();
115700
+ const fields = view.getFields() || [];
115701
+ const columns = fields.map((f) => {
115702
+ return this.quote(f.TABNAME) + "." + f.FIELDNAME.toLowerCase() + " AS " + f.VIEWFIELD.toLowerCase();
114127
115703
  }).join(", ");
114128
- let from = "";
114129
- let previous = "";
114130
- for (const j of view.getJoin() || []) {
114131
- if (previous === "") {
114132
- from += this.quote(j.LTAB.toLowerCase()) + " INNER JOIN " + this.quote(j.RTAB.toLowerCase()) + " ON " + this.quote(j.LTAB.toLowerCase()) + "." + j.LFIELD.toLowerCase() + " = " + this.quote(j.RTAB.toLowerCase()) + "." + j.RFIELD.toLowerCase();
114133
- }
114134
- else if (previous === j.LTAB + "," + j.RTAB) {
114135
- from += " AND " + this.quote(j.LTAB.toLowerCase()) + "." + j.LFIELD.toLowerCase() + " = " + this.quote(j.RTAB.toLowerCase()) + "." + j.RFIELD.toLowerCase();
114136
- }
114137
- else {
114138
- from += " INNER JOIN " + this.quote(j.RTAB.toLowerCase()) + " ON " + this.quote(j.LTAB.toLowerCase()) + "." + j.LFIELD.toLowerCase() + " = " + this.quote(j.RTAB.toLowerCase()) + "." + j.RFIELD.toLowerCase();
114139
- }
114140
- previous = j.LTAB + "," + j.RTAB;
114141
- }
114142
- from = from.trim();
114143
- if (from === "") {
114144
- from = firstTabname;
114145
- }
114146
- return `CREATE VIEW ${this.quote(view.getName().toLowerCase())} AS SELECT ${columns} FROM ${from};\n`;
115704
+ // a DD28J row compares two fields, or without RFIELD a field to the constant in RTAB, eg. 'EN'
115705
+ const joins = view.getJoin() || [];
115706
+ let pending = joins.filter(j => j.RFIELD !== undefined && j.RFIELD !== "");
115707
+ const constants = joins.filter(j => j.RFIELD === undefined || j.RFIELD === "");
115708
+ // start from the table of the first view field, typically the root table, then repeatedly
115709
+ // join a table that has conditions on the tables already joined, LTAB is not always the new one
115710
+ const tables = [];
115711
+ const conditions = {};
115712
+ const add = (table) => {
115713
+ tables.push(table);
115714
+ const on = pending.filter(j => tables.includes(j.LTAB) && tables.includes(j.RTAB));
115715
+ pending = pending.filter(j => on.includes(j) === false);
115716
+ conditions[table] = [...on, ...constants.filter(j => j.LTAB === table)].map(j => this.condition(view, j));
115717
+ };
115718
+ const first = fields[0]?.TABNAME;
115719
+ const root = first !== undefined && (pending.length === 0 || pending.some(j => j.LTAB === first || j.RTAB === first))
115720
+ ? first : (pending[0] || constants[0])?.LTAB;
115721
+ if (root === undefined) {
115722
+ throw new Error(`View ${view.getName()}: no tables`);
115723
+ }
115724
+ add(root);
115725
+ while (pending.length > 0) {
115726
+ // tables without conditions on the joined ones are cross joined
115727
+ const next = pending.find(j => tables.includes(j.LTAB) || tables.includes(j.RTAB)) || pending[0];
115728
+ add(tables.includes(next.LTAB) ? next.RTAB : next.LTAB);
115729
+ }
115730
+ for (const c of constants) {
115731
+ if (tables.includes(c.LTAB) === false) {
115732
+ add(c.LTAB);
115733
+ }
115734
+ }
115735
+ let from = this.quote(tables[0]);
115736
+ for (const table of tables.slice(1)) {
115737
+ from += conditions[table].length === 0
115738
+ ? " CROSS JOIN " + this.quote(table)
115739
+ : " INNER JOIN " + this.quote(table) + " ON " + conditions[table].join(" AND ");
115740
+ }
115741
+ if (conditions[tables[0]].length > 0) {
115742
+ from += " WHERE " + conditions[tables[0]].join(" AND ");
115743
+ }
115744
+ return `CREATE VIEW ${this.quote(view.getName())} AS SELECT ${columns} FROM ${from};\n`;
115745
+ }
115746
+ condition(view, j) {
115747
+ const operator = OPERATORS[j.OPERATOR];
115748
+ if (operator === undefined) {
115749
+ throw new Error(`View ${view.getName()}: join operator ${j.OPERATOR} not supported`);
115750
+ }
115751
+ const right = j.RFIELD === undefined || j.RFIELD === ""
115752
+ ? this.escape(j.RTAB)
115753
+ : this.quote(j.RTAB) + "." + j.RFIELD.toLowerCase();
115754
+ return this.quote(j.LTAB) + "." + j.LFIELD.toLowerCase() + " " + operator + " " + right;
115755
+ }
115756
+ // the constant keeps its single quotes, statements are inside a javascript string template
115757
+ escape(value) {
115758
+ let ret = value.replace(/\\/g, "\\\\");
115759
+ ret = ret.replace(/`/g, "\\`");
115760
+ ret = ret.replace(/\${/g, "\\${");
115761
+ return ret;
114147
115762
  }
114148
115763
  }
114149
115764
  exports.DatabaseSchemaReuse = DatabaseSchemaReuse;
@@ -117350,6 +118965,7 @@ const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_
117350
118965
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
117351
118966
  const type_name_or_infer_1 = __webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@abaplint/transpiler/build/src/expressions/type_name_or_infer.js");
117352
118967
  const types_1 = __webpack_require__(/*! ../types */ "./node_modules/@abaplint/transpiler/build/src/types.js");
118968
+ const field_assignment_1 = __webpack_require__(/*! ./field_assignment */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_assignment.js");
117353
118969
  class NewObjectTranspiler {
117354
118970
  transpile(node, traversal) {
117355
118971
  const ret = new chunk_1.Chunk();
@@ -117394,10 +119010,48 @@ class NewObjectTranspiler {
117394
119010
  ret.appendString(traversal.toType(type) + ".set(await (new " + clas + "()).constructor_(" + para + "))");
117395
119011
  }
117396
119012
  else {
117397
- const source = node.findFirstExpression(abaplint.Expressions.Source);
119013
+ // a new data object with a copy of the value, never the source itself; async, as sources can await
117398
119014
  const typeCode = traversal.toType(type);
117399
- const sourceCode = source === undefined ? typeCode : traversal.traverse(source).getCode();
117400
- ret.appendString("((() => {const r = new abap.types.DataReference(" + typeCode + "); r.assign(" + sourceCode + "); return r; })())");
119015
+ const setCode = this.buildValue(node, type, traversal);
119016
+ ret.appendString("(await (async () => {const r = new abap.types.DataReference(" + typeCode + "); r.assign(" + typeCode + ");" + setCode + " return r; })())");
119017
+ }
119018
+ return ret;
119019
+ }
119020
+ buildValue(node, type, traversal) {
119021
+ let ret = "";
119022
+ const parameters = node.findDirectExpression(core_1.Expressions.ParameterListS);
119023
+ if (parameters) {
119024
+ // NEW ty( a = 1 b = 2 ), components of a structure
119025
+ for (const p of parameters.findDirectExpressions(core_1.Expressions.ParameterS)) {
119026
+ const name = p.findDirectExpression(core_1.Expressions.ParameterName).concatTokens().toLowerCase();
119027
+ const source = traversal.traverse(p.findDirectExpression(core_1.Expressions.Source)).getCode();
119028
+ ret += ` r.getPointer().setField("${name}", ${source});`;
119029
+ }
119030
+ return ret;
119031
+ }
119032
+ const single = node.getChildren()[3];
119033
+ if (single instanceof core_1.Nodes.ExpressionNode && single.get() instanceof core_1.Expressions.Source) {
119034
+ return ` r.getPointer().set(${traversal.traverse(single).getCode()});`;
119035
+ }
119036
+ else if (!(type instanceof abaplint.BasicTypes.TableType)) {
119037
+ return ret;
119038
+ }
119039
+ // NEW tab( ( 1 ) ( a = 2 ) ), table lines
119040
+ const rowType = traversal.toType(type.getRowType());
119041
+ let row = "";
119042
+ for (const c of node.getChildren().slice(3)) {
119043
+ if (c instanceof core_1.Nodes.TokenNode) {
119044
+ if (c.getFirstToken().getStr() === ")" && row !== "") {
119045
+ ret += ` r.getPointer().appendThis(${rowType}${row});`;
119046
+ row = "";
119047
+ }
119048
+ }
119049
+ else if (c.get() instanceof core_1.Expressions.Source) {
119050
+ row += `.set(${traversal.traverse(c).getCode()})`;
119051
+ }
119052
+ else if (c.get() instanceof core_1.Expressions.FieldAssignment && c instanceof core_1.Nodes.ExpressionNode) {
119053
+ row += new field_assignment_1.FieldAssignmentTranspiler().transpile(c, traversal).getCode();
119054
+ }
117401
119055
  }
117402
119056
  return ret;
117403
119057
  }
@@ -126437,11 +128091,33 @@ class FieldSymbolTranspiler {
126437
128091
  if (found === undefined) {
126438
128092
  throw new Error("FieldSymbolTranspiler, var not found, \"" + token.getStr() + "\"");
126439
128093
  }
128094
+ let type = found.getType();
128095
+ // abaplint types TYPE STANDARD TABLE, SORTED TABLE, HASHED TABLE, INDEX TABLE and
128096
+ // ANY TABLE alike, a generic table without a primary key; the kind is in the statement,
128097
+ // and the runtime needs it to refuse an ASSIGN of a table of another kind
128098
+ const typeTable = node.findDirectExpression(abaplint.Expressions.TypeTable);
128099
+ if (typeTable !== undefined
128100
+ && type instanceof abaplint.BasicTypes.TableType
128101
+ && type.getOptions().primaryKey === undefined) {
128102
+ const kind = /^TYPE (STANDARD|SORTED|HASHED|INDEX|ANY) TABLE$/i.exec(typeTable.concatTokens());
128103
+ if (kind !== null) {
128104
+ const options = {
128105
+ ...type.getOptions(),
128106
+ primaryKey: {
128107
+ name: "primary_key",
128108
+ type: kind[1].toUpperCase(),
128109
+ keyFields: [],
128110
+ isUnique: false,
128111
+ },
128112
+ };
128113
+ type = new abaplint.BasicTypes.TableType(type.getRowType(), options, type.getQualifiedName());
128114
+ }
128115
+ }
126440
128116
  if (name) {
126441
128117
  return new chunk_1.Chunk()
126442
128118
  .appendString("let ")
126443
128119
  .appendString(new field_symbol_1.FieldSymbolTranspiler().transpile(name, traversal).getCode())
126444
- .appendString(" = new abap.types.FieldSymbol(" + traversal.toType(found.getType()) + ");");
128120
+ .appendString(" = new abap.types.FieldSymbol(" + traversal.toType(type) + ");");
126445
128121
  }
126446
128122
  throw new Error("FieldSymbolTranspiler, name not found");
126447
128123
  }
@@ -133504,6 +135180,9 @@ class ClassImplementationTranspiler {
133504
135180
  transpile(node, traversal) {
133505
135181
  const ret = new chunk_1.Chunk();
133506
135182
  for (const c of node.getChildren()) {
135183
+ if (c.get() instanceof abaplint.Statements.EndClass) {
135184
+ ret.appendString(this.buildPartiallyImplementedStubs(node, traversal));
135185
+ }
133507
135186
  ret.appendChunk(traversal.traverse(c));
133508
135187
  if (c.get() instanceof abaplint.Statements.ClassImplementation) {
133509
135188
  ret.appendString(this.buildConstructor(node.getFirstStatement(), traversal));
@@ -133519,6 +135198,103 @@ class ClassImplementationTranspiler {
133519
135198
  return ret;
133520
135199
  }
133521
135200
  ///////////////////////////////
135201
+ /** INTERFACES ... PARTIALLY IMPLEMENTED: the interface methods the test class
135202
+ * does not implement exist on a system and raise CX_SY_DYN_CALL_ILLEGAL_METHOD
135203
+ * when called. Emits a method of that shape under the name the implementation
135204
+ * would have had, so the call ends in that exception and not in a TypeError */
135205
+ buildPartiallyImplementedStubs(node, traversal) {
135206
+ const token = node.findFirstExpression(abaplint.Expressions.ClassName)?.getFirstToken();
135207
+ if (token === undefined) {
135208
+ return "";
135209
+ }
135210
+ const cdef = traversal.getClassDefinition(token);
135211
+ const scope = traversal.findCurrentScopeByToken(token);
135212
+ if (cdef === undefined || scope === undefined) {
135213
+ return "";
135214
+ }
135215
+ const partial = cdef.getImplementing().filter(i => i.partial === true);
135216
+ if (partial.length === 0) {
135217
+ return "";
135218
+ }
135219
+ // the methods the class implements itself, by the emitted name
135220
+ const implemented = new Set();
135221
+ for (const m of node.findAllStatements(abaplint.Statements.MethodImplementation)) {
135222
+ const name = m.findFirstExpression(abaplint.Expressions.MethodName)?.getFirstToken().getStr();
135223
+ if (name !== undefined) {
135224
+ implemented.add(traversal_1.Traversal.escapeNamespace(name.replace("~", "$").toLowerCase()));
135225
+ }
135226
+ }
135227
+ // an interface a superclass implements is inherited, with the real implementations,
135228
+ // a stub for one of its methods would override those
135229
+ const inherited = new Set();
135230
+ let sup = cdef.getSuperClass();
135231
+ while (sup !== undefined) {
135232
+ const sdef = traversal.findClassDefinition(sup, scope);
135233
+ for (const name of this.findIncludedInterfaces(sdef?.getImplementing().map(i => i.name) || [], scope, traversal)) {
135234
+ inherited.add(name);
135235
+ }
135236
+ sup = sdef?.getSuperClass();
135237
+ }
135238
+ let ret = "";
135239
+ for (const name of this.findIncludedInterfaces(partial.map(i => i.name), scope, traversal)) {
135240
+ if (inherited.has(name)) {
135241
+ continue;
135242
+ }
135243
+ const intf = traversal.findInterfaceDefinition(name, scope);
135244
+ if (intf === undefined) {
135245
+ continue;
135246
+ }
135247
+ const prefix = traversal_1.Traversal.escapeNamespace(intf.getName().toLowerCase()) + "$";
135248
+ for (const m of intf.getMethodDefinitions().getAll()) {
135249
+ const emitted = prefix + traversal_1.Traversal.escapeNamespace(m.getName().toLowerCase());
135250
+ if (implemented.has(emitted)) {
135251
+ continue;
135252
+ }
135253
+ implemented.add(emitted);
135254
+ ret += this.buildNotImplementedMethod(emitted, m, token.getStr().toLowerCase(), intf.getName(), token, traversal);
135255
+ }
135256
+ }
135257
+ return ret;
135258
+ }
135259
+ /** the interfaces, upper cased, with the interfaces they include, recursively */
135260
+ findIncludedInterfaces(names, scope, traversal) {
135261
+ const ret = [];
135262
+ const queue = [...names];
135263
+ while (queue.length > 0) {
135264
+ const name = queue.shift().toUpperCase();
135265
+ if (ret.includes(name)) {
135266
+ continue;
135267
+ }
135268
+ ret.push(name);
135269
+ const intf = traversal.findInterfaceDefinition(name, scope);
135270
+ queue.push(...(intf?.getImplementing().map(i => i.name) || []));
135271
+ }
135272
+ return ret;
135273
+ }
135274
+ /** the method a system generates for an interface method the test class leaves
135275
+ * out under PARTIALLY IMPLEMENTED: calling it raises CX_SY_DYN_CALL_ILLEGAL_METHOD
135276
+ * (ABAP keyword documentation, INTERFACES - PARTIALLY IMPLEMENTED), the class and
135277
+ * method named, instead of a JavaScript TypeError no CATCH sees */
135278
+ buildNotImplementedMethod(emitted, m, className, interfaceName, token, traversal) {
135279
+ const unique = m.getParameters().getAll().length > 0 ? "INPUT" : "";
135280
+ const exception = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_METHOD'", token, true);
135281
+ const classUpper = className.toUpperCase();
135282
+ const methodUpper = interfaceName.toUpperCase() + "~" + m.getName().toUpperCase();
135283
+ const notFound = `CX_SY_DYN_CALL_ILLEGAL_METHOD not found, ${classUpper}->${methodUpper} is not implemented`;
135284
+ const body = `if (${exception} === undefined) { throw new Error("${notFound}"); }\n` +
135285
+ `throw await new ${exception}().constructor_({` +
135286
+ `classname: new abap.types.String().set("${classUpper}"), ` +
135287
+ `methodname: new abap.types.String().set("${methodUpper}")});\n`;
135288
+ let ret = "";
135289
+ if (m.isStatic() === true) {
135290
+ // in ABAP static methods can be called with instance arrows, "->"
135291
+ ret += "async " + emitted + "(" + unique + ") {\n" +
135292
+ "return " + traversal_1.Traversal.escapeNamespace(className) + "." + emitted + "(" + unique + ");\n" +
135293
+ "}\n" + "static ";
135294
+ }
135295
+ ret += "async " + emitted + "(" + unique + ") {\n" + body + "}\n";
135296
+ return ret;
135297
+ }
133522
135298
  hasConstructor(node) {
133523
135299
  for (const m of node.findAllStatements(abaplint.Statements.MethodImplementation)) {
133524
135300
  const name = m.findFirstExpression(abaplint.Expressions.MethodName)?.getFirstToken().getStr();