@abaplint/transpiler-cli 2.13.32 → 2.13.34

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 (3) hide show
  1. package/build/bundle.js +622 -220
  2. package/package.json +3 -3
  3. package/schema.json +235 -0
package/build/bundle.js CHANGED
@@ -264,6 +264,7 @@ const path = __importStar(__webpack_require__(/*! path */ "path"));
264
264
  const glob = __importStar(__webpack_require__(/*! glob */ "./node_modules/glob/glob.js"));
265
265
  const childProcess = __importStar(__webpack_require__(/*! child_process */ "child_process"));
266
266
  const os = __importStar(__webpack_require__(/*! os */ "os"));
267
+ const module_1 = __webpack_require__(/*! module */ "module");
267
268
  const progress_1 = __importDefault(__webpack_require__(/*! progress */ "./node_modules/progress/index.js"));
268
269
  const Transpiler = __importStar(__webpack_require__(/*! @abaplint/transpiler */ "./node_modules/@abaplint/transpiler/build/src/index.js"));
269
270
  const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
@@ -355,9 +356,28 @@ async function writeObjects(outputFiles, config, outputFolder, files) {
355
356
  }
356
357
  await file_operations_1.FileOperations.writeFiles(filesToWrite);
357
358
  }
359
+ const PLUGIN_MODULE = "@abaplint/transpiler-extras";
360
+ function loadPlugin() {
361
+ // createRequire so the plugin resolves from the project consuming the CLI, also after webpacking
362
+ const projectRequire = (0, module_1.createRequire)(path.join(process.cwd(), "package.json"));
363
+ try {
364
+ projectRequire.resolve(PLUGIN_MODULE);
365
+ }
366
+ catch {
367
+ // plugin package not installed
368
+ return undefined;
369
+ }
370
+ const plugin = projectRequire(PLUGIN_MODULE).plugin;
371
+ if (plugin === undefined) {
372
+ throw new Error(PLUGIN_MODULE + " does not export a plugin");
373
+ }
374
+ console.log("Plugin loaded: " + PLUGIN_MODULE + ", object types: " + plugin.objectTypes().join(", "));
375
+ console.log("Note this requires license for commercial use");
376
+ return plugin;
377
+ }
358
378
  async function build(config, files) {
359
379
  const libFiles = await loadLib(config);
360
- const t = new Transpiler.Transpiler(config.options);
380
+ const t = new Transpiler.Transpiler(config.options, loadPlugin());
361
381
  const reg = new abaplint.Registry();
362
382
  for (const f of files) {
363
383
  reg.addFile(new abaplint.MemoryFile(f.filename, f.contents));
@@ -2242,7 +2262,7 @@ class Regex {
2242
2262
  return result;
2243
2263
  }
2244
2264
  railroad() {
2245
- return "Railroad.Terminal(\"" + this.regexp.source.replace(/\\/g, "\\\\") + "\")";
2265
+ return "Railroad.Terminal(\"" + this.regexp.source.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\")";
2246
2266
  }
2247
2267
  toStr() {
2248
2268
  return this.regexp.toString();
@@ -11180,10 +11200,10 @@ const _derived_types_1 = __webpack_require__(/*! ./_derived_types */ "./node_mod
11180
11200
  class TypeStructure extends combi_1.Expression {
11181
11201
  getRunnable() {
11182
11202
  const entity = (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation);
11183
- const derivedTypes = (0, _derived_types_1.derivedTypesAlt)((0, combi_1.ver)(version_1.Release.v779, (0, combi_1.seq)("FUNCTION REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v779, (0, combi_1.seq)("ACTION REQUEST", entity)), (0, combi_1.seq)("ACTION IMPORT", _1.Source), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL AUTHORIZATION REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL AUTHORIZATION RESULT", entity)), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL FEATURES REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL FEATURES RESULT", entity)), (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("AUTHORIZATION REQUEST", entity)), (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES REQUEST", entity)), (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName), (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("PERMISSIONS RESULT", entity)), (0, combi_1.seq)("READ LINK", _1.EntityAssociation), (0, combi_1.seq)("HIERARCHY", _1.NamespaceSimpleName), (0, combi_1.seq)("EVENT", _1.EventName));
11184
- const structure = (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("STRUCTURE FOR", derivedTypes));
11185
- const response = (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("RESPONSE FOR", (0, combi_1.altPrio)((0, combi_1.seq)("FAILED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("FAILED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("FAILED", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED", _1.NamespaceSimpleName))));
11186
- const request = (0, combi_1.ver)(version_1.Release.v778, (0, combi_1.seq)("REQUEST FOR", (0, combi_1.alt)("CHANGE", "DELETE"), _1.NamespaceSimpleName));
11203
+ const derivedTypes = (0, _derived_types_1.derivedTypesAlt)((0, combi_1.ver)(version_1.Release.v779, (0, combi_1.seq)("FUNCTION REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v779, (0, combi_1.seq)("ACTION REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.seq)("ACTION IMPORT", _1.Source), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL AUTHORIZATION REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL AUTHORIZATION RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL FEATURES REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("GLOBAL FEATURES RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("AUTHORIZATION REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName), (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("PERMISSIONS RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.seq)("READ LINK", _1.EntityAssociation), (0, combi_1.seq)("HIERARCHY", _1.NamespaceSimpleName), (0, combi_1.seq)("EVENT", _1.EventName));
11204
+ const structure = (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("STRUCTURE FOR", derivedTypes), { also: combi_1.AlsoIn.OpenABAP });
11205
+ const response = (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("RESPONSE FOR", (0, combi_1.altPrio)((0, combi_1.seq)("FAILED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("FAILED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("FAILED", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("MAPPED", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED EARLY", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED LATE", _1.NamespaceSimpleName), (0, combi_1.seq)("REPORTED", _1.NamespaceSimpleName))), { also: combi_1.AlsoIn.OpenABAP });
11206
+ const request = (0, combi_1.ver)(version_1.Release.v778, (0, combi_1.seq)("REQUEST FOR", (0, combi_1.alt)("CHANGE", "DELETE"), _1.NamespaceSimpleName), { also: combi_1.AlsoIn.OpenABAP });
11187
11207
  return (0, combi_1.seq)("TYPE", (0, combi_1.altPrio)(structure, response, request), (0, combi_1.optPrio)("VALUE IS INITIAL"));
11188
11208
  }
11189
11209
  }
@@ -53200,6 +53220,12 @@ class CDSParser {
53200
53220
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
53201
53221
  res = combi_1.Combi.run(new Expressions.CDSDefineHierarchy(), tokens, version_1.defaultRelease);
53202
53222
  }
53223
+ if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
53224
+ res = combi_1.Combi.run(new Expressions.CDSDefineExternalEntity(), tokens, version_1.defaultRelease);
53225
+ }
53226
+ if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
53227
+ res = combi_1.Combi.run(new Expressions.CDSDefineTableEntity(), tokens, version_1.defaultRelease);
53228
+ }
53203
53229
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
53204
53230
  return undefined;
53205
53231
  }
@@ -53225,12 +53251,10 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
53225
53251
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
53226
53252
  class CDSAggregate extends combi_1.Expression {
53227
53253
  getRunnable() {
53228
- // CDSPrefixedName handles dotted paths with path filters e.g. a._Assoc[filter].Field
53229
- // CDSArithmetics handles expressions like sum(A + B), max(A * 100)
53230
- // fieldAsType handles avg(field AS type) / sum(field AS type) — SAP inline type coercion
53231
53254
  const fieldAsType = (0, combi_1.seq)(_1.CDSPrefixedName, "AS", _1.CDSType);
53232
- const value = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSCast, _1.CDSCase, _1.CDSFunction, fieldAsType, _1.CDSPrefixedName, _1.CDSString, "*");
53233
- return (0, combi_1.seq)((0, combi_1.altPrio)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")), value, ")");
53255
+ const funcAsType = (0, combi_1.seq)(_1.CDSFunction, "AS", _1.CDSType);
53256
+ const value = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSCast, _1.CDSCase, funcAsType, _1.CDSFunction, fieldAsType, _1.CDSPrefixedName, _1.CDSString, "*");
53257
+ return (0, combi_1.seq)((0, combi_1.altPrio)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.optPrio)((0, combi_1.altPrio)("DISTINCT", "ALL")), value, (0, combi_1.opt)((0, combi_1.seq)("AS", _1.CDSType)), ")");
53234
53258
  }
53235
53259
  }
53236
53260
  exports.CDSAggregate = CDSAggregate;
@@ -53689,7 +53713,7 @@ class CDSDefineAbstract extends combi_1.Expression {
53689
53713
  getRunnable() {
53690
53714
  const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", _1.CDSType, ";");
53691
53715
  const compsiOrAssoci = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53692
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "ABSTRACT", "ENTITY", cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.alt)(field, compsiOrAssoci)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
53716
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "ABSTRACT", "ENTITY", cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.alt)(field, compsiOrAssoci)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
53693
53717
  }
53694
53718
  }
53695
53719
  exports.CDSDefineAbstract = CDSDefineAbstract;
@@ -53723,6 +53747,36 @@ exports.CDSDefineCustom = CDSDefineCustom;
53723
53747
 
53724
53748
  /***/ },
53725
53749
 
53750
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_external_entity.js"
53751
+ /*!*********************************************************************************************!*\
53752
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_external_entity.js ***!
53753
+ \*********************************************************************************************/
53754
+ (__unused_webpack_module, exports, __webpack_require__) {
53755
+
53756
+ "use strict";
53757
+
53758
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
53759
+ exports.CDSDefineExternalEntity = void 0;
53760
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
53761
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
53762
+ class CDSDefineExternalEntity extends combi_1.Expression {
53763
+ getRunnable() {
53764
+ const extNameValue = (0, combi_1.alt)(_1.CDSName, (0, combi_1.regex)(/^"[^"]*"$/));
53765
+ const externalName = (0, combi_1.seq)("EXTERNAL", "NAME", extNameValue);
53766
+ const nullability = (0, combi_1.optPrio)((0, combi_1.alt)("NOT NULL", "NULL"));
53767
+ const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.str)("KEY")), _1.CDSName, ":", _1.CDSType, nullability, (0, combi_1.optPrio)(externalName), ";");
53768
+ const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53769
+ const body = (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp));
53770
+ const externalEntity = (0, combi_1.seq)((0, combi_1.opt)("WRITABLE"), "EXTERNAL", "ENTITY", _1.CDSName, (0, combi_1.opt)(externalName), (0, combi_1.opt)(_1.CDSWithParameters));
53771
+ const staticEntity = (0, combi_1.seq)("STATIC", "ENTITY", _1.CDSName, (0, combi_1.opt)(externalName));
53772
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.alt)(externalEntity, staticEntity), (0, combi_1.str)("{"), body, (0, combi_1.str)("}"), (0, combi_1.opt)((0, combi_1.seq)("WITH", "FEDERATED", "DATA", (0, combi_1.optPrio)((0, combi_1.alt)((0, combi_1.seq)("PROVIDED", "AT", "RUNTIME"), (0, combi_1.seq)("PROVIDED", "BY", _1.CDSName))))), (0, combi_1.opt)(";"));
53773
+ }
53774
+ }
53775
+ exports.CDSDefineExternalEntity = CDSDefineExternalEntity;
53776
+ //# sourceMappingURL=cds_define_external_entity.js.map
53777
+
53778
+ /***/ },
53779
+
53726
53780
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_hierarchy.js"
53727
53781
  /*!***************************************************************************************!*\
53728
53782
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_hierarchy.js ***!
@@ -53742,7 +53796,13 @@ class CDSDefineHierarchy extends combi_1.Expression {
53742
53796
  const siblingsOrderField = (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.optPrio)(sortDirection));
53743
53797
  const siblingsOrder = (0, combi_1.seq)("SIBLINGS", "ORDER", "BY", siblingsOrderField, (0, combi_1.star)((0, combi_1.seq)(",", siblingsOrderField)));
53744
53798
  const directory = (0, combi_1.seq)("DIRECTORY", _1.CDSName, "FILTER", "BY", _1.CDSCondition);
53745
- const hierarchyBody = (0, combi_1.seq)("SOURCE", _1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), "CHILD", "TO", "PARENT", "ASSOCIATION", _1.CDSName, (0, combi_1.opt)(directory), (0, combi_1.opt)((0, combi_1.seq)("START", "WHERE", _1.CDSCondition)), (0, combi_1.opt)(siblingsOrder), (0, combi_1.opt)((0, combi_1.seq)("NODETYPE", _1.CDSName)), (0, combi_1.opt)((0, combi_1.seq)("DEPTH", _1.CDSInteger)), (0, combi_1.opt)((0, combi_1.seq)("MULTIPLE", "PARENTS", (0, combi_1.altPrio)("NOT ALLOWED", "ALLOWED"))), (0, combi_1.opt)((0, combi_1.seq)("ORPHANS", (0, combi_1.altPrio)("IGNORE", "ROOT"))), (0, combi_1.opt)((0, combi_1.seq)("CYCLES", "BREAKUP")), (0, combi_1.opt)((0, combi_1.seq)("CACHE", (0, combi_1.altPrio)("FORCE", "NONE", "EMPTY", "OFF"))));
53799
+ // DATE PERIOD: period from <field> to <field> [valid from :p to :p]
53800
+ const datePeriod = (0, combi_1.seq)("PERIOD", "FROM", _1.CDSName, "TO", _1.CDSName, (0, combi_1.opt)((0, combi_1.seq)("VALID", "FROM", _1.CDSPrefixedName, "TO", _1.CDSPrefixedName)));
53801
+ // DEPTH accepts an integer literal or a parameter reference (:param)
53802
+ const depthValue = (0, combi_1.altPrio)(_1.CDSInteger, _1.CDSPrefixedName);
53803
+ // LOAD mode: BULK, INCREMENTAL, or a parameter reference ($parameters.p_load)
53804
+ const loadMode = (0, combi_1.altPrio)("BULK", "INCREMENTAL", _1.CDSPrefixedName);
53805
+ const hierarchyBody = (0, combi_1.seq)("SOURCE", _1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), "CHILD", "TO", "PARENT", "ASSOCIATION", _1.CDSName, (0, combi_1.opt)(directory), (0, combi_1.opt)(datePeriod), (0, combi_1.opt)((0, combi_1.seq)("START", "WHERE", _1.CDSCondition)), (0, combi_1.opt)(siblingsOrder), (0, combi_1.opt)((0, combi_1.seq)("LOAD", loadMode)), (0, combi_1.opt)((0, combi_1.seq)("NODETYPE", _1.CDSName)), (0, combi_1.opt)((0, combi_1.seq)("DEPTH", depthValue)), (0, combi_1.opt)((0, combi_1.seq)("MULTIPLE", "PARENTS", (0, combi_1.altPrio)("NOT ALLOWED", "ALLOWED", (0, combi_1.seq)("LEAVES", (0, combi_1.optPrio)("ONLY"))))), (0, combi_1.opt)((0, combi_1.seq)("ORPHANS", (0, combi_1.altPrio)("IGNORE", "ROOT", "ERROR"))), (0, combi_1.opt)((0, combi_1.seq)("CYCLES", (0, combi_1.altPrio)("BREAKUP", "ERROR"))), (0, combi_1.opt)((0, combi_1.seq)("GENERATE", "SPANTREE")), (0, combi_1.opt)((0, combi_1.seq)("CACHE", (0, combi_1.altPrio)("ON", "OFF", "FORCE"))));
53746
53806
  return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", "HIERARCHY", _1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), "AS", "PARENT", "CHILD", "HIERARCHY", "(", hierarchyBody, ")", "{", (0, combi_1.seq)(field, (0, combi_1.star)((0, combi_1.seq)(",", field))), "}", (0, combi_1.opt)(";"));
53747
53807
  }
53748
53808
  }
@@ -53766,7 +53826,9 @@ const __1 = __webpack_require__(/*! ../.. */ "./node_modules/@abaplint/core/buil
53766
53826
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
53767
53827
  class CDSDefineProjection extends combi_1.Expression {
53768
53828
  getRunnable() {
53769
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), (0, combi_1.opt)("TRANSIENT"), "VIEW", (0, combi_1.ver)(__1.Release.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), (0, combi_1.opt)(_1.CDSWithParameters), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)(_1.CDSAssociation), (0, combi_1.str)("{"), (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(",")), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(";"));
53829
+ // redefine association _Assoc redirected to [composition child | parent] Entity
53830
+ const redefineAssoc = (0, combi_1.seq)("REDEFINE", "ASSOCIATION", _1.CDSName, "REDIRECTED", "TO", (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("COMPOSITION", "CHILD"), "PARENT")), _1.CDSName);
53831
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), (0, combi_1.opt)("TRANSIENT"), "VIEW", (0, combi_1.ver)(__1.Release.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), (0, combi_1.opt)(_1.CDSWithParameters), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSAssociation, redefineAssoc)), (0, combi_1.str)("{"), (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(",")), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(";"));
53770
53832
  }
53771
53833
  }
53772
53834
  exports.CDSDefineProjection = CDSDefineProjection;
@@ -53774,6 +53836,35 @@ exports.CDSDefineProjection = CDSDefineProjection;
53774
53836
 
53775
53837
  /***/ },
53776
53838
 
53839
+ /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_entity.js"
53840
+ /*!******************************************************************************************!*\
53841
+ !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_entity.js ***!
53842
+ \******************************************************************************************/
53843
+ (__unused_webpack_module, exports, __webpack_require__) {
53844
+
53845
+ "use strict";
53846
+
53847
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
53848
+ exports.CDSDefineTableEntity = void 0;
53849
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
53850
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
53851
+ class CDSDefineTableEntity extends combi_1.Expression {
53852
+ getRunnable() {
53853
+ const nullability = (0, combi_1.optPrio)((0, combi_1.alt)("NOT NULL", "NULL"));
53854
+ const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.str)("KEY")), _1.CDSName, ":", _1.CDSType, nullability, ";");
53855
+ const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53856
+ const inlineBody = (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp));
53857
+ const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
53858
+ const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
53859
+ const selectBody = (0, combi_1.seq)("AS", "SELECT", "FROM", _1.CDSSource, (0, combi_1.star)(_1.CDSJoin), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSComposition, _1.CDSAssociation)), (0, combi_1.opt)(elements), (0, combi_1.optPrio)(_1.CDSWhere));
53860
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "TABLE", "ENTITY", _1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.str)("{"), inlineBody, (0, combi_1.str)("}")), selectBody), (0, combi_1.opt)(";"));
53861
+ }
53862
+ }
53863
+ exports.CDSDefineTableEntity = CDSDefineTableEntity;
53864
+ //# sourceMappingURL=cds_define_table_entity.js.map
53865
+
53866
+ /***/ },
53867
+
53777
53868
  /***/ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_function.js"
53778
53869
  /*!********************************************************************************************!*\
53779
53870
  !*** ./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_function.js ***!
@@ -53817,7 +53908,8 @@ const cds_with_parameters_1 = __webpack_require__(/*! ./cds_with_parameters */ "
53817
53908
  class CDSDefineView extends combi_1.Expression {
53818
53909
  getRunnable() {
53819
53910
  const columnAlias = (0, combi_1.seq)("(", cds_name_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(",", cds_name_1.CDSName)), ")");
53820
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Release.v755, (0, combi_1.opt)("ENTITY")), cds_name_1.CDSName, (0, combi_1.opt)(columnAlias), (0, combi_1.opt)(cds_with_parameters_1.CDSWithParameters), "AS", cds_select_1.CDSSelect, (0, combi_1.opt)(";"));
53911
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), (0, combi_1.opt)("WRITABLE"), "VIEW", (0, combi_1.ver)(__1.Release.v755, (0, combi_1.opt)("ENTITY")), cds_name_1.CDSName, (0, combi_1.opt)(columnAlias), (0, combi_1.opt)(cds_with_parameters_1.CDSWithParameters), "AS", cds_select_1.CDSSelect, (0, combi_1.opt)((0, combi_1.seq)("WITH", "HIERARCHY", cds_name_1.CDSName)), // post-select WITH HIERARCHY clause
53912
+ (0, combi_1.opt)(";"));
53821
53913
  }
53822
53914
  }
53823
53915
  exports.CDSDefineView = CDSDefineView;
@@ -53843,14 +53935,11 @@ class CDSElement extends combi_1.Expression {
53843
53935
  getRunnable() {
53844
53936
  const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
53845
53937
  const colonThing = (0, combi_1.seq)(":", (0, combi_1.altPrio)(_1.CDSType, _1.CDSName, "LOCALIZED"));
53846
- // $extension.* — extension field wildcard
53847
53938
  const extensionWildcard = (0, combi_1.seq)("$extension", ".", "*");
53848
- const body = (0, combi_1.altPrio)(extensionWildcard, _1.CDSArithmetics, _1.CDSAggregate, _1.CDSString, _1.CDSArithParen, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.optPrio)(cds_as_1.CDSAs), (0, combi_1.optPrio)((0, combi_1.altPrio)(redirected, colonThing))), _1.CDSInteger);
53849
- // KEY/VIRTUAL keyword handling via altPrio:
53850
- // - Try keyword form first: if keyword consumed but body fails (e.g. "virtual.Field"),
53851
- // altPrio backtracks to plain body (which handles "virtual" as a datasource alias prefix).
53852
- // - This gives exactly 1 state in all cases (no exponential blowup from opt()).
53853
- const elementBody = (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.altPrio)("KEY", "VIRTUAL"), body), body);
53939
+ const includeElement = (0, combi_1.seq)("INCLUDE", _1.CDSPrefixedName);
53940
+ const typedVirtual = (0, combi_1.seq)("VIRTUAL", _1.CDSName, ":", _1.CDSType);
53941
+ const body = (0, combi_1.altPrio)(extensionWildcard, includeElement, _1.CDSArithmetics, _1.CDSAggregate, _1.CDSString, _1.CDSArithParen, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.optPrio)(cds_as_1.CDSAs), (0, combi_1.optPrio)((0, combi_1.altPrio)(redirected, colonThing))), _1.CDSInteger);
53942
+ const elementBody = (0, combi_1.altPrio)(typedVirtual, (0, combi_1.seq)((0, combi_1.altPrio)("KEY", "VIRTUAL"), body), body);
53854
53943
  return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), elementBody, (0, combi_1.optPrio)(cds_as_1.CDSAs));
53855
53944
  }
53856
53945
  }
@@ -53871,12 +53960,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
53871
53960
  exports.CDSExtendView = void 0;
53872
53961
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
53873
53962
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
53874
- const cds_name_1 = __webpack_require__(/*! ./cds_name */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js");
53875
53963
  class CDSExtendView extends combi_1.Expression {
53876
53964
  getRunnable() {
53877
- const namedot = (0, combi_1.seq)(cds_name_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", cds_name_1.CDSName)), (0, combi_1.optPrio)(_1.CDSAs));
53965
+ const namedot = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)), (0, combi_1.optPrio)(_1.CDSAs));
53878
53966
  const valueNested = (0, combi_1.seq)("{", namedot, (0, combi_1.star)((0, combi_1.seq)(",", namedot)), "}");
53879
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("EXTEND VIEW"), (0, combi_1.opt)((0, combi_1.str)("ENTITY")), cds_name_1.CDSName, (0, combi_1.str)("WITH"), (0, combi_1.opt)(cds_name_1.CDSName), valueNested, (0, combi_1.opt)(";"));
53967
+ const redefineAssoc = (0, combi_1.seq)("REDEFINE", "ASSOCIATION", _1.CDSPrefixedName, (0, combi_1.optPrio)((0, combi_1.seq)("[", _1.CDSCondition, "]")), (0, combi_1.opt)(_1.CDSAs), "REDIRECTED", "TO", (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("COMPOSITION", "CHILD"), "PARENT")), _1.CDSName);
53968
+ const extendView = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("EXTEND VIEW"), (0, combi_1.opt)((0, combi_1.str)("ENTITY")), _1.CDSName, (0, combi_1.str)("WITH"), (0, combi_1.opt)(_1.CDSName), (0, combi_1.star)(redefineAssoc), valueNested, (0, combi_1.opt)(";"));
53969
+ const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.optPrio)((0, combi_1.str)("KEY")), _1.CDSName, ":", _1.CDSType, ";");
53970
+ const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53971
+ const entityBody = (0, combi_1.seq)("{", (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp)), "}");
53972
+ const extendAbstractOrCustom = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "EXTEND", (0, combi_1.alt)("ABSTRACT", "CUSTOM"), "ENTITY", _1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), "WITH", entityBody, (0, combi_1.opt)(";"));
53973
+ return (0, combi_1.alt)(extendAbstractOrCustom, extendView);
53880
53974
  }
53881
53975
  }
53882
53976
  exports.CDSExtendView = CDSExtendView;
@@ -53951,12 +54045,13 @@ class CDSFunction extends combi_1.Expression {
53951
54045
  const occurrencesRegexpr = (0, combi_1.seq)("OCCURRENCES_REGEXPR", "(", conversionInputs, ")");
53952
54046
  const substrRegexpr = (0, combi_1.seq)("SUBSTR_REGEXPR", "(", conversionInputs, ")");
53953
54047
  const locateRegexpr = (0, combi_1.seq)("LOCATE_REGEXPR", "(", conversionInputs, ")");
53954
- // Generic fallback: user-defined/extension functions like GET_NUMERIC_VALUE(arg).
53955
- // Use a regex that excludes CDS keywords that would otherwise be matched by CDSName.
53956
- // Must contain at least one underscore to distinguish from keywords (e.g. GET_NUMERIC_VALUE).
53957
54048
  const extFuncName = (0, combi_1.regex)(/^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+$/i);
53958
54049
  const genericArgs = (0, combi_1.seq)(_1.CDSFunctionInput, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSFunctionInput)));
53959
- const genericFunc = (0, combi_1.seq)(extFuncName, "(", genericArgs, ")");
54050
+ const namedArgValue = (0, combi_1.altPrio)((0, combi_1.seq)("INTERVAL", _1.CDSFunctionInput, _1.CDSName), _1.CDSFunctionInput, _1.CDSName);
54051
+ const namedArgArrow = (0, combi_1.seq)(_1.CDSName, "=", ">", namedArgValue);
54052
+ const namedArgColon = (0, combi_1.seq)(_1.CDSName, ":", namedArgValue);
54053
+ const namedArgs = (0, combi_1.seq)((0, combi_1.altPrio)(namedArgArrow, namedArgColon), (0, combi_1.starPrio)((0, combi_1.seq)(",", (0, combi_1.altPrio)(namedArgArrow, namedArgColon))));
54054
+ const genericFunc = (0, combi_1.seq)(extFuncName, "(", (0, combi_1.optPrio)((0, combi_1.altPrio)(namedArgs, genericArgs)), ")");
53960
54055
  return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, upper, lower, abs, ceil, floor, round, div, division, concat_with_space, dats_is_valid, tims_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, utcl_current, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right, lpad, rpad, instr, length, ltrim, rtrim, replace, unitConversion, currencyConversion, decimalShift, fltp_to_dec, ratioOf, replaceRegexpr, matchesRegexpr, occurrencesRegexpr, substrRegexpr, locateRegexpr, curr_to_decfloat_amount, genericFunc);
53961
54056
  }
53962
54057
  }
@@ -54188,31 +54283,18 @@ const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@
54188
54283
  const cds_string_1 = __webpack_require__(/*! ./cds_string */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_string.js");
54189
54284
  class CDSPrefixedName extends combi_1.Expression {
54190
54285
  getRunnable() {
54191
- // Path filter variants:
54192
- // [inner], [left outer], [cross] — join-type redirect
54193
- // [1:left outer], [1:inner] — cardinality + join-type
54194
- // [1: condition] — cardinality + filter condition
54195
- // [condition] — filter condition only
54196
54286
  const joinType = (0, combi_1.altPrio)("LEFT OUTER", "INNER", "CROSS");
54197
54287
  const joinRedirect = (0, combi_1.seq)("[", joinType, "]");
54198
- // Cardinality spec: integer or * (e.g. [*:inner], [1:inner])
54199
54288
  const cardSpec = (0, combi_1.altPrio)(cds_integer_1.CDSInteger, "*");
54200
54289
  const cardinalityJoin = (0, combi_1.seq)("[", cardSpec, ":", joinType, "]");
54201
- // [1: left outer where condition] — cardinality + join-type + WHERE filter
54202
54290
  const cardinalityJoinWhere = (0, combi_1.seq)("[", cardSpec, ":", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
54203
- // [left outer where condition] — join-type + WHERE filter (no cardinality prefix)
54204
54291
  const joinWhere = (0, combi_1.seq)("[", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
54205
- // Text cardinality forms: [to one: cond], [to many: cond]
54206
- const textCard = (0, combi_1.altPrio)("TO ONE", "TO MANY");
54207
- const textCardFilter = (0, combi_1.seq)("[", textCard, ":", cds_condition_1.CDSCondition, "]");
54208
- // Numeric range cardinality: [0..1: cond], [1..1: cond], [0..*: cond], [n..m: cond]
54292
+ const textCard = (0, combi_1.altPrio)("TO EXACT ONE", "TO ONE", "TO MANY");
54293
+ const textCardFilter = (0, combi_1.seq)("[", textCard, (0, combi_1.optPrio)((0, combi_1.seq)(":", (0, combi_1.altPrio)((0, combi_1.seq)(joinType, "WHERE", cds_condition_1.CDSCondition), joinType, cds_condition_1.CDSCondition))), "]");
54209
54294
  const cardNum = (0, combi_1.altPrio)(cds_integer_1.CDSInteger, "*");
54210
54295
  const rangeCard = (0, combi_1.seq)(cds_integer_1.CDSInteger, ".", ".", cardNum);
54211
54296
  const rangeCardFilter = (0, combi_1.seq)("[", rangeCard, ":", cds_condition_1.CDSCondition, "]");
54212
54297
  const pathFilter = (0, combi_1.altPrio)(cardinalityJoinWhere, joinWhere, cardinalityJoin, joinRedirect, textCardFilter, rangeCardFilter, (0, combi_1.seq)("[", cardSpec, ":", cds_condition_1.CDSCondition, "]"), (0, combi_1.seq)("[", cds_condition_1.CDSCondition, "]"));
54213
- // Each dotted segment may have its own path filter: A[cond].B[cond].C
54214
- // The final segment may also be a string literal: #enum.'value'
54215
- // A segment may have a parameterized call: _Assoc( P_Key : value ) or _Assoc[filter]
54216
54298
  const segment = (0, combi_1.seq)(".", (0, combi_1.altPrio)(cds_string_1.CDSString, cds_name_1.CDSName), (0, combi_1.optPrio)((0, combi_1.altPrio)(cds_parameters_select_1.CDSParametersSelect, cds_parameters_1.CDSParameters)), (0, combi_1.optPrio)(pathFilter));
54217
54299
  return (0, combi_1.seq)(cds_name_1.CDSName, (0, combi_1.optPrio)((0, combi_1.altPrio)(cds_parameters_1.CDSParameters, cds_parameters_select_1.CDSParametersSelect)), (0, combi_1.optPrio)(pathFilter), (0, combi_1.star)(segment));
54218
54300
  }
@@ -54235,7 +54317,7 @@ exports.CDSProviderContract = void 0;
54235
54317
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
54236
54318
  class CDSProviderContract extends combi_1.Expression {
54237
54319
  getRunnable() {
54238
- return (0, combi_1.seq)("PROVIDER CONTRACT", (0, combi_1.alt)("TRANSACTIONAL_QUERY", "TRANSACTIONAL_INTERFACE", "ANALYTICAL_QUERY"));
54320
+ return (0, combi_1.seq)("PROVIDER CONTRACT", (0, combi_1.alt)("TRANSACTIONAL_QUERY", "TRANSACTIONAL_INTERFACE", "ANALYTICAL_QUERY", "SQL_QUERY", "STRUCTURED_QUERY"));
54239
54321
  }
54240
54322
  }
54241
54323
  exports.CDSProviderContract = CDSProviderContract;
@@ -54284,10 +54366,13 @@ class CDSSelect extends combi_1.Expression {
54284
54366
  getRunnable() {
54285
54367
  const fields = (0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement);
54286
54368
  const distinct = (0, combi_1.str)("DISTINCT");
54287
- // elem (,elem)* [,] — handles separator commas and optional trailing comma
54288
54369
  const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
54289
54370
  const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
54290
- return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)((0, combi_1.altPrio)("*", fields)), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSComposition, cds_association_1.CDSAssociation)), (0, combi_1.opt)(elements), (0, combi_1.optPrio)(_1.CDSWhere), (0, combi_1.optPrio)(_1.CDSGroupBy), (0, combi_1.optPrio)(_1.CDSHaving), (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("UNION", (0, combi_1.optPrio)("ALL"), CDSSelect), (0, combi_1.seq)("EXCEPT", CDSSelect), (0, combi_1.seq)("INTERSECT", CDSSelect))));
54371
+ const aspectBinding = (0, combi_1.seq)(_1.CDSPrefixedName, "=", ">", _1.CDSPrefixedName);
54372
+ const bindAspect = (0, combi_1.seq)("BIND", "ASPECT", _1.CDSName, "(", aspectBinding, (0, combi_1.starPrio)((0, combi_1.seq)(",", aspectBinding)), ")");
54373
+ const parenSelect = (0, combi_1.seq)("(", CDSSelect, ")");
54374
+ const unionBranch = (0, combi_1.altPrio)(parenSelect, CDSSelect);
54375
+ return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)((0, combi_1.altPrio)("*", fields)), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSComposition, cds_association_1.CDSAssociation)), (0, combi_1.optPrio)(bindAspect), (0, combi_1.opt)(elements), (0, combi_1.optPrio)(_1.CDSWhere), (0, combi_1.optPrio)(_1.CDSGroupBy), (0, combi_1.optPrio)(_1.CDSHaving), (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("UNION", (0, combi_1.optPrio)("ALL"), unionBranch), (0, combi_1.seq)("EXCEPT", unionBranch), (0, combi_1.seq)("INTERSECT", unionBranch))));
54291
54376
  }
54292
54377
  }
54293
54378
  exports.CDSSelect = CDSSelect;
@@ -54309,13 +54394,14 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
54309
54394
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
54310
54395
  class CDSSource extends combi_1.Expression {
54311
54396
  getRunnable() {
54312
- // Static where filter in FROM: SomeTable [Field = 'Value']
54313
54397
  const staticFilter = (0, combi_1.seq)("[", _1.CDSCondition, "]");
54314
- const singleSource = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)(_1.CDSParametersSelect), (0, combi_1.optPrio)(staticFilter), (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
54315
- // FROM ( src [JOIN src ON cond]* ) — parenthesized join chain, arbitrarily nested
54316
- // CDSSource is self-referential here to handle: (((T1 join T2) join T3) join T4)
54398
+ // Dotted path: T._Assoc association path as FROM source
54399
+ const dottedName = (0, combi_1.seq)(_1.CDSName, ".", _1.CDSName);
54400
+ const namedSource = (0, combi_1.altPrio)(dottedName, _1.CDSName);
54401
+ const singleSource = (0, combi_1.seq)(namedSource, (0, combi_1.optPrio)(_1.CDSParametersSelect), (0, combi_1.optPrio)(staticFilter), (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
54402
+ const funcSingleSource = (0, combi_1.seq)(_1.CDSFunction, (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
54317
54403
  const parenSource = (0, combi_1.seq)("(", (0, combi_1.altPrio)(CDSSource, singleSource), (0, combi_1.star)(_1.CDSJoin), ")");
54318
- return (0, combi_1.altPrio)(parenSource, singleSource);
54404
+ return (0, combi_1.altPrio)(parenSource, funcSingleSource, singleSource);
54319
54405
  }
54320
54406
  }
54321
54407
  exports.CDSSource = CDSSource;
@@ -54336,15 +54422,8 @@ exports.CDSString = void 0;
54336
54422
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
54337
54423
  class CDSString extends combi_1.Expression {
54338
54424
  getRunnable() {
54339
- // Allow any character except unescaped single quote; escape sequences:
54340
- // '' — escaped single quote (doubling)
54341
- // \' — escaped single quote (backslash form)
54342
- // \\ — escaped backslash (e.g. '\\' in ltrim/rtrim calls)
54343
- // \x — other backslash sequences not followed by '
54344
54425
  const reg = (0, combi_1.regex)(/^'(?:[^'\\]|''|\\'|\\\\|\\(?!'))*'$/);
54345
- // Typed literal: abap.int4'1', abap.char'X', abap.numc(3)'123', etc.
54346
- // Lexed as tokens: abap, ., typename, 'value'
54347
- const abapTypeName = (0, combi_1.regex)(/^(?:int[1-9]|sstring|char|numc|dats|tims|fltp|decfloat\d+|dec|string|raw|xstring|clnt|lang|unit|cuky|curr|quan|d|t|p|n|c|x|f)$/i);
54426
+ const abapTypeName = (0, combi_1.regex)(/^(?:int[1-9]|int8|sstring|char|numc|dats|datn|tims|timn|utcl|utclong|fltp|decfloat\d+|dec|string|rawstring|rstr|raw|xstring|clnt|lang|unit|cuky|curr|quan|geom_ewkb|d34n|d16n|d34d|d16d|d34s|d16s|d34r|d16r|d|t|p|n|c|x|f)$/i);
54348
54427
  const abap = (0, combi_1.seq)("abap", ".", abapTypeName, (0, combi_1.optPrio)((0, combi_1.seq)("(", (0, combi_1.regex)(/^\d+$/), ")")), reg);
54349
54428
  return (0, combi_1.altPrio)(abap, reg);
54350
54429
  }
@@ -54462,8 +54541,10 @@ __exportStar(__webpack_require__(/*! ./cds_composition */ "./node_modules/@abapl
54462
54541
  __exportStar(__webpack_require__(/*! ./cds_condition */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_condition.js"), exports);
54463
54542
  __exportStar(__webpack_require__(/*! ./cds_define_abstract */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_abstract.js"), exports);
54464
54543
  __exportStar(__webpack_require__(/*! ./cds_define_custom */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_custom.js"), exports);
54544
+ __exportStar(__webpack_require__(/*! ./cds_define_external_entity */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_external_entity.js"), exports);
54465
54545
  __exportStar(__webpack_require__(/*! ./cds_define_hierarchy */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_hierarchy.js"), exports);
54466
54546
  __exportStar(__webpack_require__(/*! ./cds_define_projection */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_projection.js"), exports);
54547
+ __exportStar(__webpack_require__(/*! ./cds_define_table_entity */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_entity.js"), exports);
54467
54548
  __exportStar(__webpack_require__(/*! ./cds_define_table_function */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_table_function.js"), exports);
54468
54549
  __exportStar(__webpack_require__(/*! ./cds_define_view */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_define_view.js"), exports);
54469
54550
  __exportStar(__webpack_require__(/*! ./cds_element */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_element.js"), exports);
@@ -54546,7 +54627,10 @@ class Config {
54546
54627
  for (const rule of sorted) {
54547
54628
  rules[rule.getMetadata().key] = rule.getConfig();
54548
54629
  }
54549
- const version = ver;
54630
+ const version = ver !== null && ver !== void 0 ? ver : {
54631
+ release: version_1.Release.Newest.name,
54632
+ language: langVer !== null && langVer !== void 0 ? langVer : version_1.LanguageVersion.Normal,
54633
+ };
54550
54634
  // defaults: dont skip anything, report everything. The user can decide to skip stuff
54551
54635
  // its difficult to debug errors not being reported
54552
54636
  const config = {
@@ -54673,12 +54757,14 @@ class Config {
54673
54757
  return v;
54674
54758
  }
54675
54759
  getLanguageVersion() {
54676
- var _a;
54760
+ if (this.config.syntax.languageVersion !== undefined) {
54761
+ return this.config.syntax.languageVersion;
54762
+ }
54677
54763
  const v = this.config.syntax.version;
54678
54764
  if (v !== undefined && typeof v !== "string") {
54679
54765
  return v.language;
54680
54766
  }
54681
- return (_a = this.config.syntax.languageVersion) !== null && _a !== void 0 ? _a : version_1.LanguageVersion.Normal;
54767
+ return version_1.LanguageVersion.Normal;
54682
54768
  }
54683
54769
  checkVersion() {
54684
54770
  const version = this.config.syntax.version;
@@ -55282,49 +55368,6 @@ exports.DDICReferences = DDICReferences;
55282
55368
 
55283
55369
  /***/ },
55284
55370
 
55285
- /***/ "./node_modules/@abaplint/core/build/src/ddl/ddl_lexer.js"
55286
- /*!****************************************************************!*\
55287
- !*** ./node_modules/@abaplint/core/build/src/ddl/ddl_lexer.js ***!
55288
- \****************************************************************/
55289
- (__unused_webpack_module, exports, __webpack_require__) {
55290
-
55291
- "use strict";
55292
-
55293
- Object.defineProperty(exports, "__esModule", ({ value: true }));
55294
- exports.DDLLexer = void 0;
55295
- const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
55296
- const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
55297
- class DDLLexer {
55298
- static run(file) {
55299
- const step1 = [];
55300
- const lines = file.getRaw().replace(/\r/g, "").split("\n");
55301
- for (const l of lines) {
55302
- if (l.startsWith("@")) {
55303
- continue; // skip annotations for now
55304
- }
55305
- step1.push(...l.split(" "));
55306
- }
55307
- const step2 = [];
55308
- for (const t of step1) {
55309
- if (t === "") {
55310
- continue;
55311
- }
55312
- else if (t.endsWith(";")) {
55313
- step2.push(t.substr(0, t.length - 1));
55314
- step2.push(";");
55315
- }
55316
- else {
55317
- step2.push(t);
55318
- }
55319
- }
55320
- return step2.map(t => new tokens_1.Identifier(new position_1.Position(1, 1), t));
55321
- }
55322
- }
55323
- exports.DDLLexer = DDLLexer;
55324
- //# sourceMappingURL=ddl_lexer.js.map
55325
-
55326
- /***/ },
55327
-
55328
55371
  /***/ "./node_modules/@abaplint/core/build/src/ddl/ddl_parser.js"
55329
55372
  /*!*****************************************************************!*\
55330
55373
  !*** ./node_modules/@abaplint/core/build/src/ddl/ddl_parser.js ***!
@@ -55368,67 +55411,250 @@ var __importStar = (this && this.__importStar) || (function () {
55368
55411
  })();
55369
55412
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55370
55413
  exports.DDLParser = exports.DDLKind = void 0;
55414
+ const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
55371
55415
  const combi_1 = __webpack_require__(/*! ../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55372
55416
  const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
55373
55417
  const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
55374
- const ddl_lexer_1 = __webpack_require__(/*! ./ddl_lexer */ "./node_modules/@abaplint/core/build/src/ddl/ddl_lexer.js");
55418
+ const cds_lexer_1 = __webpack_require__(/*! ../cds/cds_lexer */ "./node_modules/@abaplint/core/build/src/cds/cds_lexer.js");
55375
55419
  const Expressions = __importStar(__webpack_require__(/*! ./expressions */ "./node_modules/@abaplint/core/build/src/ddl/expressions/index.js"));
55376
55420
  var DDLKind;
55377
55421
  (function (DDLKind) {
55378
55422
  DDLKind["Structure"] = "structure";
55379
55423
  DDLKind["Table"] = "table";
55424
+ DDLKind["Aspect"] = "aspect";
55425
+ DDLKind["ExtendType"] = "extend-type";
55380
55426
  })(DDLKind || (exports.DDLKind = DDLKind = {}));
55381
55427
  class DDLParser {
55382
55428
  parse(file) {
55383
- const tokens = ddl_lexer_1.DDLLexer.run(file);
55429
+ let tokens = cds_lexer_1.CDSLexer.run(file);
55430
+ tokens = tokens.filter(t => !(t instanceof tokens_1.Comment));
55384
55431
  let res = combi_1.Combi.run(new Expressions.DDLStructure(), tokens, version_1.defaultRelease);
55385
55432
  if (res === undefined) {
55386
55433
  res = combi_1.Combi.run(new Expressions.DDLTable(), tokens, version_1.defaultRelease);
55387
55434
  }
55435
+ if (res === undefined) {
55436
+ res = combi_1.Combi.run(new Expressions.DDLAspect(), tokens, version_1.defaultRelease);
55437
+ }
55438
+ if (res === undefined) {
55439
+ res = combi_1.Combi.run(new Expressions.DDLExtendType(), tokens, version_1.defaultRelease);
55440
+ }
55388
55441
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
55389
55442
  return undefined;
55390
55443
  }
55391
55444
  return this.parsedToResult(res[0]);
55392
55445
  }
55393
55446
  parsedToResult(node) {
55394
- var _a, _b;
55395
55447
  const fields = [];
55396
- let found = node.findDirectExpressions(Expressions.DDLStructureField);
55397
- found = found.concat(node.findDirectExpressions(Expressions.DDLTableField));
55398
- found = found.concat(node.findDirectExpressions(Expressions.DDLInclude));
55399
- for (const f of found) {
55400
- const name = ((_a = f.findDirectExpression(Expressions.DDLName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || "";
55401
- if (f.get() instanceof Expressions.DDLInclude) {
55402
- fields.push({
55403
- name: ".INCLUDE",
55404
- type: name,
55405
- key: false,
55406
- notNull: false,
55407
- });
55448
+ for (const child of node.getChildren()) {
55449
+ if (!(child instanceof nodes_1.ExpressionNode)) {
55450
+ continue;
55451
+ }
55452
+ const expr = child.get();
55453
+ const isField = expr instanceof Expressions.DDLStructureField
55454
+ || expr instanceof Expressions.DDLTableField
55455
+ || expr instanceof Expressions.DDLInclude
55456
+ || expr instanceof Expressions.DDLNamedInclude;
55457
+ if (!isField) {
55458
+ continue;
55459
+ }
55460
+ const key = this.hasKey(child);
55461
+ const notNull = this.hasNotNull(child);
55462
+ if (expr instanceof Expressions.DDLInclude) {
55463
+ const target = this.compactTokens(child.findDirectExpression(Expressions.DDLName));
55464
+ fields.push({ name: ".INCLUDE", type: target, key, notNull });
55465
+ }
55466
+ else if (expr instanceof Expressions.DDLNamedInclude) {
55467
+ const names = child.findDirectExpressions(Expressions.DDLName);
55468
+ const alias = this.compactTokens(names[0]);
55469
+ const target = this.compactTokens(names[1]);
55470
+ fields.push({ name: alias, type: target, key, notNull });
55408
55471
  }
55409
55472
  else {
55410
- const type = ((_b = f.findDirectExpression(Expressions.DDLType)) === null || _b === void 0 ? void 0 : _b.concatTokens()) || "";
55411
- fields.push({
55412
- name,
55413
- type,
55414
- key: false,
55415
- notNull: false,
55416
- });
55473
+ const name = this.compactTokens(child.findDirectExpression(Expressions.DDLName));
55474
+ const type = this.compactTokens(child.findDirectExpression(Expressions.DDLType));
55475
+ fields.push({ name, type, key, notNull });
55417
55476
  }
55418
55477
  }
55419
55478
  const result = {
55420
- name: node.findDirectExpression(Expressions.DDLName).concatTokens(),
55421
- kind: node.get() instanceof Expressions.DDLStructure ? DDLKind.Structure : DDLKind.Table,
55479
+ name: this.compactTokens(node.findDirectExpression(Expressions.DDLName)),
55480
+ kind: this.kindOf(node),
55422
55481
  fields,
55423
55482
  };
55424
55483
  return result;
55425
55484
  }
55485
+ compactTokens(node) {
55486
+ if (node === undefined) {
55487
+ return "";
55488
+ }
55489
+ return node.concatTokens().replace(/\s+/g, "");
55490
+ }
55491
+ hasKey(node) {
55492
+ var _a, _b, _c;
55493
+ for (const c of node.getChildren()) {
55494
+ const expr = (_b = (_a = c).get) === null || _b === void 0 ? void 0 : _b.call(_a);
55495
+ const ctor = (_c = expr === null || expr === void 0 ? void 0 : expr.constructor) === null || _c === void 0 ? void 0 : _c.name;
55496
+ if (ctor === "CDSAnnotation") {
55497
+ continue;
55498
+ }
55499
+ const tok = c.concatTokens().toUpperCase().trim();
55500
+ if (tok === "KEY") {
55501
+ return true;
55502
+ }
55503
+ if (tok !== "") {
55504
+ return false;
55505
+ }
55506
+ }
55507
+ return false;
55508
+ }
55509
+ hasNotNull(node) {
55510
+ var _a, _b, _c, _d;
55511
+ const children = node.getChildren();
55512
+ for (let i = 0; i < children.length - 1; i++) {
55513
+ const a = (_b = (_a = children[i]).concatTokens) === null || _b === void 0 ? void 0 : _b.call(_a).toUpperCase().trim();
55514
+ const b = (_d = (_c = children[i + 1]).concatTokens) === null || _d === void 0 ? void 0 : _d.call(_c).toUpperCase().trim();
55515
+ if (a === "NOT" && b === "NULL") {
55516
+ return true;
55517
+ }
55518
+ }
55519
+ return false;
55520
+ }
55521
+ kindOf(node) {
55522
+ const expr = node.get();
55523
+ if (expr instanceof Expressions.DDLStructure) {
55524
+ return DDLKind.Structure;
55525
+ }
55526
+ if (expr instanceof Expressions.DDLAspect) {
55527
+ return DDLKind.Aspect;
55528
+ }
55529
+ if (expr instanceof Expressions.DDLExtendType) {
55530
+ return DDLKind.ExtendType;
55531
+ }
55532
+ return DDLKind.Table;
55533
+ }
55426
55534
  }
55427
55535
  exports.DDLParser = DDLParser;
55428
55536
  //# sourceMappingURL=ddl_parser.js.map
55429
55537
 
55430
55538
  /***/ },
55431
55539
 
55540
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_aspect.js"
55541
+ /*!*****************************************************************************!*\
55542
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_aspect.js ***!
55543
+ \*****************************************************************************/
55544
+ (__unused_webpack_module, exports, __webpack_require__) {
55545
+
55546
+ "use strict";
55547
+
55548
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55549
+ exports.DDLAspect = void 0;
55550
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55551
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55552
+ const ddl_extend_1 = __webpack_require__(/*! ./ddl_extend */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend.js");
55553
+ const ddl_include_1 = __webpack_require__(/*! ./ddl_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_include.js");
55554
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55555
+ const ddl_named_include_1 = __webpack_require__(/*! ./ddl_named_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_named_include.js");
55556
+ const ddl_table_field_1 = __webpack_require__(/*! ./ddl_table_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_table_field.js");
55557
+ class DDLAspect extends combi_1.Expression {
55558
+ getRunnable() {
55559
+ const entry = (0, combi_1.altPrio)(ddl_named_include_1.DDLNamedInclude, ddl_include_1.DDLInclude, ddl_table_field_1.DDLTableField, ddl_extend_1.DDLExtend);
55560
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), "DEFINE", "ASPECT", ddl_name_1.DDLName, "{", (0, combi_1.plusPrio)(entry), "}", (0, combi_1.optPrio)(";"));
55561
+ }
55562
+ }
55563
+ exports.DDLAspect = DDLAspect;
55564
+ //# sourceMappingURL=ddl_aspect.js.map
55565
+
55566
+ /***/ },
55567
+
55568
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_clauses.js"
55569
+ /*!******************************************************************************!*\
55570
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_clauses.js ***!
55571
+ \******************************************************************************/
55572
+ (__unused_webpack_module, exports, __webpack_require__) {
55573
+
55574
+ "use strict";
55575
+
55576
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55577
+ exports.DDLValueHelp = exports.DDLForeignKey = exports.DDLForeignKeyTarget = void 0;
55578
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55579
+ const ddl_literal_1 = __webpack_require__(/*! ./ddl_literal */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_literal.js");
55580
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55581
+ const ddl_where_1 = __webpack_require__(/*! ./ddl_where */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_where.js");
55582
+ class DDLForeignKeyTarget extends combi_1.Expression {
55583
+ getRunnable() {
55584
+ const cardinality = (0, combi_1.seq)("[", ddl_literal_1.DDLCardinalityValue, ".", ".", ddl_literal_1.DDLCardinalityValue, (0, combi_1.optPrio)((0, combi_1.seq)(",", ddl_literal_1.DDLCardinalityValue)), "]");
55585
+ return (0, combi_1.seq)((0, combi_1.optPrio)(cardinality), ddl_name_1.DDLName);
55586
+ }
55587
+ }
55588
+ exports.DDLForeignKeyTarget = DDLForeignKeyTarget;
55589
+ class DDLForeignKey extends combi_1.Expression {
55590
+ getRunnable() {
55591
+ return (0, combi_1.seq)("WITH", "FOREIGN", "KEY", DDLForeignKeyTarget, (0, combi_1.optPrio)(ddl_where_1.DDLWhere));
55592
+ }
55593
+ }
55594
+ exports.DDLForeignKey = DDLForeignKey;
55595
+ class DDLValueHelp extends combi_1.Expression {
55596
+ getRunnable() {
55597
+ return (0, combi_1.seq)("WITH", "VALUE", "HELP", ddl_name_1.DDLName, (0, combi_1.optPrio)(ddl_where_1.DDLWhere));
55598
+ }
55599
+ }
55600
+ exports.DDLValueHelp = DDLValueHelp;
55601
+ //# sourceMappingURL=ddl_clauses.js.map
55602
+
55603
+ /***/ },
55604
+
55605
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend.js"
55606
+ /*!*****************************************************************************!*\
55607
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend.js ***!
55608
+ \*****************************************************************************/
55609
+ (__unused_webpack_module, exports, __webpack_require__) {
55610
+
55611
+ "use strict";
55612
+
55613
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55614
+ exports.DDLExtend = void 0;
55615
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55616
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55617
+ const ddl_clauses_1 = __webpack_require__(/*! ./ddl_clauses */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_clauses.js");
55618
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55619
+ class DDLExtend extends combi_1.Expression {
55620
+ getRunnable() {
55621
+ const clause = (0, combi_1.alt)(ddl_clauses_1.DDLForeignKey, ddl_clauses_1.DDLValueHelp);
55622
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), "EXTEND", ddl_name_1.DDLName, ":", (0, combi_1.plus)(clause), ";");
55623
+ }
55624
+ }
55625
+ exports.DDLExtend = DDLExtend;
55626
+ //# sourceMappingURL=ddl_extend.js.map
55627
+
55628
+ /***/ },
55629
+
55630
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend_type.js"
55631
+ /*!**********************************************************************************!*\
55632
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend_type.js ***!
55633
+ \**********************************************************************************/
55634
+ (__unused_webpack_module, exports, __webpack_require__) {
55635
+
55636
+ "use strict";
55637
+
55638
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55639
+ exports.DDLExtendType = void 0;
55640
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55641
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55642
+ const ddl_include_1 = __webpack_require__(/*! ./ddl_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_include.js");
55643
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55644
+ const ddl_named_include_1 = __webpack_require__(/*! ./ddl_named_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_named_include.js");
55645
+ const ddl_structure_field_1 = __webpack_require__(/*! ./ddl_structure_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_structure_field.js");
55646
+ const ddl_table_field_1 = __webpack_require__(/*! ./ddl_table_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_table_field.js");
55647
+ class DDLExtendType extends combi_1.Expression {
55648
+ getRunnable() {
55649
+ const entry = (0, combi_1.altPrio)(ddl_named_include_1.DDLNamedInclude, ddl_include_1.DDLInclude, ddl_table_field_1.DDLTableField, ddl_structure_field_1.DDLStructureField);
55650
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), "EXTEND", "TYPE", ddl_name_1.DDLName, "WITH", ddl_name_1.DDLName, "{", (0, combi_1.plusPrio)(entry), "}", (0, combi_1.optPrio)(";"));
55651
+ }
55652
+ }
55653
+ exports.DDLExtendType = DDLExtendType;
55654
+ //# sourceMappingURL=ddl_extend_type.js.map
55655
+
55656
+ /***/ },
55657
+
55432
55658
  /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_include.js"
55433
55659
  /*!******************************************************************************!*\
55434
55660
  !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_include.js ***!
@@ -55440,10 +55666,13 @@ exports.DDLParser = DDLParser;
55440
55666
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55441
55667
  exports.DDLInclude = void 0;
55442
55668
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55669
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55670
+ const ddl_clauses_1 = __webpack_require__(/*! ./ddl_clauses */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_clauses.js");
55443
55671
  const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55444
55672
  class DDLInclude extends combi_1.Expression {
55445
55673
  getRunnable() {
55446
- return (0, combi_1.seq)("INCLUDE", ddl_name_1.DDLName, ";");
55674
+ const trailingClause = (0, combi_1.alt)(ddl_clauses_1.DDLForeignKey, ddl_clauses_1.DDLValueHelp);
55675
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), "INCLUDE", ddl_name_1.DDLName, (0, combi_1.optPrio)((0, combi_1.seq)("WITH", "SUFFIX", ddl_name_1.DDLName)), (0, combi_1.optPrio)("NOT NULL"), (0, combi_1.star)(trailingClause), ";");
55447
55676
  }
55448
55677
  }
55449
55678
  exports.DDLInclude = DDLInclude;
@@ -55451,6 +55680,34 @@ exports.DDLInclude = DDLInclude;
55451
55680
 
55452
55681
  /***/ },
55453
55682
 
55683
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_literal.js"
55684
+ /*!******************************************************************************!*\
55685
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_literal.js ***!
55686
+ \******************************************************************************/
55687
+ (__unused_webpack_module, exports, __webpack_require__) {
55688
+
55689
+ "use strict";
55690
+
55691
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55692
+ exports.DDLStringLiteral = exports.DDLCardinalityValue = void 0;
55693
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55694
+ const cds_integer_1 = __webpack_require__(/*! ../../cds/expressions/cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js");
55695
+ class DDLCardinalityValue extends combi_1.Expression {
55696
+ getRunnable() {
55697
+ return (0, combi_1.altPrio)(cds_integer_1.CDSInteger, "*");
55698
+ }
55699
+ }
55700
+ exports.DDLCardinalityValue = DDLCardinalityValue;
55701
+ class DDLStringLiteral extends combi_1.Expression {
55702
+ getRunnable() {
55703
+ return (0, combi_1.regex)(/^'[^']*'$/);
55704
+ }
55705
+ }
55706
+ exports.DDLStringLiteral = DDLStringLiteral;
55707
+ //# sourceMappingURL=ddl_literal.js.map
55708
+
55709
+ /***/ },
55710
+
55454
55711
  /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js"
55455
55712
  /*!***************************************************************************!*\
55456
55713
  !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js ***!
@@ -55462,9 +55719,10 @@ exports.DDLInclude = DDLInclude;
55462
55719
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55463
55720
  exports.DDLName = void 0;
55464
55721
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55722
+ const cds_name_1 = __webpack_require__(/*! ../../cds/expressions/cds_name */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_name.js");
55465
55723
  class DDLName extends combi_1.Expression {
55466
55724
  getRunnable() {
55467
- return (0, combi_1.regex)(/^\w+$/);
55725
+ return (0, combi_1.alt)(cds_name_1.CDSName, (0, combi_1.regex)(/^"[^"]*"$/));
55468
55726
  }
55469
55727
  }
55470
55728
  exports.DDLName = DDLName;
@@ -55472,6 +55730,53 @@ exports.DDLName = DDLName;
55472
55730
 
55473
55731
  /***/ },
55474
55732
 
55733
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_named_include.js"
55734
+ /*!************************************************************************************!*\
55735
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_named_include.js ***!
55736
+ \************************************************************************************/
55737
+ (__unused_webpack_module, exports, __webpack_require__) {
55738
+
55739
+ "use strict";
55740
+
55741
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55742
+ exports.DDLNamedInclude = void 0;
55743
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55744
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55745
+ const ddl_clauses_1 = __webpack_require__(/*! ./ddl_clauses */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_clauses.js");
55746
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55747
+ class DDLNamedInclude extends combi_1.Expression {
55748
+ getRunnable() {
55749
+ const trailingClause = (0, combi_1.alt)(ddl_clauses_1.DDLForeignKey, ddl_clauses_1.DDLValueHelp);
55750
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), ddl_name_1.DDLName, ":", "INCLUDE", ddl_name_1.DDLName, (0, combi_1.optPrio)((0, combi_1.seq)("WITH", "SUFFIX", ddl_name_1.DDLName)), (0, combi_1.optPrio)("NOT NULL"), (0, combi_1.star)(trailingClause), ";");
55751
+ }
55752
+ }
55753
+ exports.DDLNamedInclude = DDLNamedInclude;
55754
+ //# sourceMappingURL=ddl_named_include.js.map
55755
+
55756
+ /***/ },
55757
+
55758
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_qualified_name.js"
55759
+ /*!*************************************************************************************!*\
55760
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_qualified_name.js ***!
55761
+ \*************************************************************************************/
55762
+ (__unused_webpack_module, exports, __webpack_require__) {
55763
+
55764
+ "use strict";
55765
+
55766
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55767
+ exports.DDLQualifiedName = void 0;
55768
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55769
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55770
+ class DDLQualifiedName extends combi_1.Expression {
55771
+ getRunnable() {
55772
+ return (0, combi_1.seq)(ddl_name_1.DDLName, (0, combi_1.optPrio)((0, combi_1.seq)(".", ddl_name_1.DDLName)));
55773
+ }
55774
+ }
55775
+ exports.DDLQualifiedName = DDLQualifiedName;
55776
+ //# sourceMappingURL=ddl_qualified_name.js.map
55777
+
55778
+ /***/ },
55779
+
55475
55780
  /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_structure.js"
55476
55781
  /*!********************************************************************************!*\
55477
55782
  !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_structure.js ***!
@@ -55483,12 +55788,15 @@ exports.DDLName = DDLName;
55483
55788
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55484
55789
  exports.DDLStructure = void 0;
55485
55790
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55486
- const ddl_structure_field_1 = __webpack_require__(/*! ./ddl_structure_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_structure_field.js");
55487
- const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55791
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55488
55792
  const ddl_include_1 = __webpack_require__(/*! ./ddl_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_include.js");
55793
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55794
+ const ddl_named_include_1 = __webpack_require__(/*! ./ddl_named_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_named_include.js");
55795
+ const ddl_structure_field_1 = __webpack_require__(/*! ./ddl_structure_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_structure_field.js");
55489
55796
  class DDLStructure extends combi_1.Expression {
55490
55797
  getRunnable() {
55491
- return (0, combi_1.seq)("DEFINE STRUCTURE", ddl_name_1.DDLName, "{", (0, combi_1.plusPrio)((0, combi_1.altPrio)(ddl_structure_field_1.DDLStructureField, ddl_include_1.DDLInclude)), "}");
55798
+ const entry = (0, combi_1.altPrio)(ddl_named_include_1.DDLNamedInclude, ddl_include_1.DDLInclude, ddl_structure_field_1.DDLStructureField);
55799
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), "DEFINE", "STRUCTURE", ddl_name_1.DDLName, "{", (0, combi_1.plusPrio)(entry), "}", (0, combi_1.optPrio)(";"));
55492
55800
  }
55493
55801
  }
55494
55802
  exports.DDLStructure = DDLStructure;
@@ -55507,11 +55815,12 @@ exports.DDLStructure = DDLStructure;
55507
55815
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55508
55816
  exports.DDLStructureField = void 0;
55509
55817
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55818
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55510
55819
  const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55511
55820
  const ddl_type_1 = __webpack_require__(/*! ./ddl_type */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_type.js");
55512
55821
  class DDLStructureField extends combi_1.Expression {
55513
55822
  getRunnable() {
55514
- return (0, combi_1.seq)(ddl_name_1.DDLName, ":", ddl_type_1.DDLType, ";");
55823
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), ddl_name_1.DDLName, ":", ddl_type_1.DDLType, (0, combi_1.optPrio)("NOT NULL"), ";");
55515
55824
  }
55516
55825
  }
55517
55826
  exports.DDLStructureField = DDLStructureField;
@@ -55530,12 +55839,16 @@ exports.DDLStructureField = DDLStructureField;
55530
55839
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55531
55840
  exports.DDLTable = void 0;
55532
55841
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55842
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55843
+ const ddl_extend_1 = __webpack_require__(/*! ./ddl_extend */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend.js");
55533
55844
  const ddl_include_1 = __webpack_require__(/*! ./ddl_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_include.js");
55534
55845
  const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55846
+ const ddl_named_include_1 = __webpack_require__(/*! ./ddl_named_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_named_include.js");
55535
55847
  const ddl_table_field_1 = __webpack_require__(/*! ./ddl_table_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_table_field.js");
55536
55848
  class DDLTable extends combi_1.Expression {
55537
55849
  getRunnable() {
55538
- return (0, combi_1.seq)("DEFINE TABLE", ddl_name_1.DDLName, "{", (0, combi_1.plusPrio)((0, combi_1.altPrio)(ddl_table_field_1.DDLTableField, ddl_include_1.DDLInclude)), "}");
55850
+ const entry = (0, combi_1.altPrio)(ddl_named_include_1.DDLNamedInclude, ddl_include_1.DDLInclude, ddl_table_field_1.DDLTableField, ddl_extend_1.DDLExtend);
55851
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), "DEFINE", "TABLE", ddl_name_1.DDLName, "{", (0, combi_1.plusPrio)(entry), "}", (0, combi_1.optPrio)(";"));
55539
55852
  }
55540
55853
  }
55541
55854
  exports.DDLTable = DDLTable;
@@ -55554,11 +55867,14 @@ exports.DDLTable = DDLTable;
55554
55867
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55555
55868
  exports.DDLTableField = void 0;
55556
55869
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55870
+ const expressions_1 = __webpack_require__(/*! ../../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
55871
+ const ddl_clauses_1 = __webpack_require__(/*! ./ddl_clauses */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_clauses.js");
55557
55872
  const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55558
55873
  const ddl_type_1 = __webpack_require__(/*! ./ddl_type */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_type.js");
55559
55874
  class DDLTableField extends combi_1.Expression {
55560
55875
  getRunnable() {
55561
- return (0, combi_1.seq)((0, combi_1.optPrio)("KEY"), ddl_name_1.DDLName, ":", ddl_type_1.DDLType, (0, combi_1.optPrio)("NOT NULL"), ";");
55876
+ const trailingClause = (0, combi_1.alt)(ddl_clauses_1.DDLForeignKey, ddl_clauses_1.DDLValueHelp);
55877
+ return (0, combi_1.seq)((0, combi_1.star)(expressions_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), ddl_name_1.DDLName, ":", ddl_type_1.DDLType, (0, combi_1.optPrio)("NOT NULL"), (0, combi_1.star)(trailingClause), ";");
55562
55878
  }
55563
55879
  }
55564
55880
  exports.DDLTableField = DDLTableField;
@@ -55577,9 +55893,15 @@ exports.DDLTableField = DDLTableField;
55577
55893
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55578
55894
  exports.DDLType = void 0;
55579
55895
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55896
+ const cds_integer_1 = __webpack_require__(/*! ../../cds/expressions/cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js");
55897
+ const ddl_name_1 = __webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js");
55580
55898
  class DDLType extends combi_1.Expression {
55581
55899
  getRunnable() {
55582
- return (0, combi_1.regex)(/^(abap\.)?\w+(\(\d+\))?$/);
55900
+ const decimals = (0, combi_1.seq)(",", cds_integer_1.CDSInteger);
55901
+ const lenSpec = (0, combi_1.seq)("(", cds_integer_1.CDSInteger, (0, combi_1.optPrio)(decimals), ")");
55902
+ const dotted = (0, combi_1.seq)(ddl_name_1.DDLName, ".", ddl_name_1.DDLName, (0, combi_1.optPrio)(lenSpec));
55903
+ const plain = (0, combi_1.seq)(ddl_name_1.DDLName, (0, combi_1.optPrio)(lenSpec));
55904
+ return (0, combi_1.altPrio)(dotted, plain);
55583
55905
  }
55584
55906
  }
55585
55907
  exports.DDLType = DDLType;
@@ -55587,6 +55909,31 @@ exports.DDLType = DDLType;
55587
55909
 
55588
55910
  /***/ },
55589
55911
 
55912
+ /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_where.js"
55913
+ /*!****************************************************************************!*\
55914
+ !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_where.js ***!
55915
+ \****************************************************************************/
55916
+ (__unused_webpack_module, exports, __webpack_require__) {
55917
+
55918
+ "use strict";
55919
+
55920
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
55921
+ exports.DDLWhere = void 0;
55922
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
55923
+ const ddl_qualified_name_1 = __webpack_require__(/*! ./ddl_qualified_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_qualified_name.js");
55924
+ const ddl_literal_1 = __webpack_require__(/*! ./ddl_literal */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_literal.js");
55925
+ class DDLWhere extends combi_1.Expression {
55926
+ getRunnable() {
55927
+ const value = (0, combi_1.alt)(ddl_qualified_name_1.DDLQualifiedName, ddl_literal_1.DDLStringLiteral);
55928
+ const condition = (0, combi_1.seq)(ddl_qualified_name_1.DDLQualifiedName, "=", value);
55929
+ return (0, combi_1.seq)("WHERE", condition, (0, combi_1.star)((0, combi_1.seq)("AND", condition)));
55930
+ }
55931
+ }
55932
+ exports.DDLWhere = DDLWhere;
55933
+ //# sourceMappingURL=ddl_where.js.map
55934
+
55935
+ /***/ },
55936
+
55590
55937
  /***/ "./node_modules/@abaplint/core/build/src/ddl/expressions/index.js"
55591
55938
  /*!************************************************************************!*\
55592
55939
  !*** ./node_modules/@abaplint/core/build/src/ddl/expressions/index.js ***!
@@ -55610,13 +55957,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
55610
55957
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
55611
55958
  };
55612
55959
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55960
+ __exportStar(__webpack_require__(/*! ./ddl_aspect */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_aspect.js"), exports);
55961
+ __exportStar(__webpack_require__(/*! ./ddl_clauses */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_clauses.js"), exports);
55962
+ __exportStar(__webpack_require__(/*! ./ddl_extend */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend.js"), exports);
55963
+ __exportStar(__webpack_require__(/*! ./ddl_extend_type */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_extend_type.js"), exports);
55613
55964
  __exportStar(__webpack_require__(/*! ./ddl_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_include.js"), exports);
55965
+ __exportStar(__webpack_require__(/*! ./ddl_literal */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_literal.js"), exports);
55614
55966
  __exportStar(__webpack_require__(/*! ./ddl_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_name.js"), exports);
55967
+ __exportStar(__webpack_require__(/*! ./ddl_named_include */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_named_include.js"), exports);
55968
+ __exportStar(__webpack_require__(/*! ./ddl_qualified_name */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_qualified_name.js"), exports);
55615
55969
  __exportStar(__webpack_require__(/*! ./ddl_structure_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_structure_field.js"), exports);
55616
55970
  __exportStar(__webpack_require__(/*! ./ddl_structure */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_structure.js"), exports);
55617
55971
  __exportStar(__webpack_require__(/*! ./ddl_table_field */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_table_field.js"), exports);
55618
55972
  __exportStar(__webpack_require__(/*! ./ddl_table */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_table.js"), exports);
55619
55973
  __exportStar(__webpack_require__(/*! ./ddl_type */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_type.js"), exports);
55974
+ __exportStar(__webpack_require__(/*! ./ddl_where */ "./node_modules/@abaplint/core/build/src/ddl/expressions/ddl_where.js"), exports);
55620
55975
  //# sourceMappingURL=index.js.map
55621
55976
 
55622
55977
  /***/ },
@@ -56008,8 +56363,8 @@ var __importStar = (this && this.__importStar) || (function () {
56008
56363
  };
56009
56364
  })();
56010
56365
  Object.defineProperty(exports, "__esModule", ({ value: true }));
56011
- exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.AbstractFile = exports.ABAPFile = exports.MemoryFile = exports.Edits = exports.ReferenceType = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.SpaghettiScopeNode = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.FormLengthStats = exports.FunctionLengthStats = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.versionToABAPRelease = exports.releaseAtLeast = exports.Release = exports.LanguageVersion = exports.Version = exports.Config = exports.Issue = void 0;
56012
- exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.RulesRunner = exports.SpaghettiScope = void 0;
56366
+ exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLKind = exports.DDLParser = exports.AbstractFile = exports.ABAPFile = exports.MemoryFile = exports.Edits = exports.ReferenceType = exports.NativeSQL = exports.MacroContent = exports.MacroCall = exports.SpaghettiScopeNode = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.SkipLogic = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.FormLengthStats = exports.FunctionLengthStats = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.CyclomaticComplexityStats = exports.versionToABAPRelease = exports.releaseAtLeast = exports.Release = exports.LanguageVersion = exports.Version = exports.Config = exports.Issue = void 0;
56367
+ exports.LSPEdit = exports.RuleTag = exports.Severity = exports.Visibility = exports.Info = exports.Diagnostics = exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = void 0;
56013
56368
  const issue_1 = __webpack_require__(/*! ./issue */ "./node_modules/@abaplint/core/build/src/issue.js");
56014
56369
  Object.defineProperty(exports, "Issue", ({ enumerable: true, get: function () { return issue_1.Issue; } }));
56015
56370
  const config_1 = __webpack_require__(/*! ./config */ "./node_modules/@abaplint/core/build/src/config.js");
@@ -56103,6 +56458,7 @@ const severity_1 = __webpack_require__(/*! ./severity */ "./node_modules/@abapli
56103
56458
  Object.defineProperty(exports, "Severity", ({ enumerable: true, get: function () { return severity_1.Severity; } }));
56104
56459
  const ddl_parser_1 = __webpack_require__(/*! ./ddl/ddl_parser */ "./node_modules/@abaplint/core/build/src/ddl/ddl_parser.js");
56105
56460
  Object.defineProperty(exports, "DDLParser", ({ enumerable: true, get: function () { return ddl_parser_1.DDLParser; } }));
56461
+ Object.defineProperty(exports, "DDLKind", ({ enumerable: true, get: function () { return ddl_parser_1.DDLKind; } }));
56106
56462
  const cds_parser_1 = __webpack_require__(/*! ./cds/cds_parser */ "./node_modules/@abaplint/core/build/src/cds/cds_parser.js");
56107
56463
  Object.defineProperty(exports, "CDSParser", ({ enumerable: true, get: function () { return cds_parser_1.CDSParser; } }));
56108
56464
  const rules_runner_1 = __webpack_require__(/*! ./rules_runner */ "./node_modules/@abaplint/core/build/src/rules_runner.js");
@@ -61241,6 +61597,13 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
61241
61597
  }
61242
61598
  }
61243
61599
  }
61600
+ if (found === undefined) {
61601
+ // typed virtual element: VIRTUAL <name> : <type>
61602
+ const names = e.findAllExpressions(expressions_1.CDSName);
61603
+ if (e.findDirectTokenByText("VIRTUAL") !== undefined && names.length > 0) {
61604
+ found = names[0];
61605
+ }
61606
+ }
61244
61607
  if (found === undefined) {
61245
61608
  continue;
61246
61609
  }
@@ -68529,7 +68892,7 @@ class Registry {
68529
68892
  }
68530
68893
  static abaplintVersion() {
68531
68894
  // magic, see build script "version.js"
68532
- return "2.119.54";
68895
+ return "2.119.55";
68533
68896
  }
68534
68897
  getDDICReferences() {
68535
68898
  return this.ddicReferences;
@@ -105690,13 +106053,15 @@ var __importStar = (this && this.__importStar) || (function () {
105690
106053
  };
105691
106054
  })();
105692
106055
  Object.defineProperty(exports, "__esModule", ({ value: true }));
105693
- exports.Transpiler = exports.UnknownTypesEnum = exports.config = void 0;
106056
+ exports.Transpiler = exports.Chunk = exports.UnknownTypesEnum = exports.config = void 0;
105694
106057
  const abaplint = __importStar(__webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js"));
105695
106058
  const validation_1 = __webpack_require__(/*! ./validation */ "./node_modules/@abaplint/transpiler/build/src/validation.js");
105696
106059
  Object.defineProperty(exports, "config", ({ enumerable: true, get: function () { return validation_1.config; } }));
105697
106060
  const unit_test_1 = __webpack_require__(/*! ./unit_test */ "./node_modules/@abaplint/transpiler/build/src/unit_test.js");
105698
106061
  const types_1 = __webpack_require__(/*! ./types */ "./node_modules/@abaplint/transpiler/build/src/types.js");
105699
106062
  Object.defineProperty(exports, "UnknownTypesEnum", ({ enumerable: true, get: function () { return types_1.UnknownTypesEnum; } }));
106063
+ const chunk_1 = __webpack_require__(/*! ./chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
106064
+ Object.defineProperty(exports, "Chunk", ({ enumerable: true, get: function () { return chunk_1.Chunk; } }));
105700
106065
  const db_1 = __webpack_require__(/*! ./db */ "./node_modules/@abaplint/transpiler/build/src/db/index.js");
105701
106066
  const handle_table_1 = __webpack_require__(/*! ./handlers/handle_table */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_table.js");
105702
106067
  const handle_abap_1 = __webpack_require__(/*! ./handlers/handle_abap */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js");
@@ -105713,8 +106078,10 @@ const handle_fugr_1 = __webpack_require__(/*! ./handlers/handle_fugr */ "./node_
105713
106078
  const initialization_1 = __webpack_require__(/*! ./initialization */ "./node_modules/@abaplint/transpiler/build/src/initialization.js");
105714
106079
  class Transpiler {
105715
106080
  options;
105716
- constructor(options) {
106081
+ plugin;
106082
+ constructor(options, plugin) {
105717
106083
  this.options = options;
106084
+ this.plugin = plugin;
105718
106085
  if (this.options === undefined) {
105719
106086
  this.options = {};
105720
106087
  }
@@ -105732,15 +106099,17 @@ class Transpiler {
105732
106099
  reg.parse();
105733
106100
  this.validate(reg);
105734
106101
  const dbSetup = new db_1.DatabaseSetup(reg).run(this.options);
106102
+ this.plugin?.amendDatabaseSetup?.(dbSetup, reg, this.options || {});
105735
106103
  const output = {
105736
106104
  objects: [],
105737
106105
  unitTestScript: new unit_test_1.UnitTest().unitTestScript(reg, this.options?.skip),
105738
106106
  unitTestScriptOpen: new unit_test_1.UnitTest().unitTestScriptOpen(reg, this.options?.skip),
105739
- initializationScript: new initialization_1.Initialization().script(reg, dbSetup, this.options),
105740
- initializationScript2: new initialization_1.Initialization().script(reg, dbSetup, this.options, true),
106107
+ initializationScript: "",
106108
+ initializationScript2: "",
105741
106109
  databaseSetup: dbSetup,
105742
106110
  reg: reg,
105743
106111
  };
106112
+ const pluginOutputs = [];
105744
106113
  progress?.set(reg.getObjectCount().total, "Building");
105745
106114
  for (const obj of reg.getObjects()) {
105746
106115
  await progress?.tick("Building, " + obj.getName());
@@ -105780,12 +106149,22 @@ class Transpiler {
105780
106149
  else if (obj instanceof abaplint.Objects.MessageClass) {
105781
106150
  output.objects.push(...new handle_msag_1.HandleMSAG().runObject(obj, reg));
105782
106151
  }
106152
+ else if (this.plugin !== undefined) {
106153
+ const handled = this.plugin.handleObject(obj, reg, this.options || {});
106154
+ if (handled !== undefined) {
106155
+ output.objects.push(...handled);
106156
+ pluginOutputs.push(...handled);
106157
+ }
106158
+ }
105783
106159
  }
106160
+ // after the object loop, plugin output files are imported by the initialization scripts
106161
+ output.initializationScript = new initialization_1.Initialization().script(reg, dbSetup, this.options, false, pluginOutputs);
106162
+ output.initializationScript2 = new initialization_1.Initialization().script(reg, dbSetup, this.options, true, pluginOutputs);
105784
106163
  return output;
105785
106164
  }
105786
106165
  // ///////////////////////////////
105787
106166
  validate(reg) {
105788
- const issues = new validation_1.Validation(this.options).run(reg);
106167
+ const issues = new validation_1.Validation(this.options, this.plugin).run(reg);
105789
106168
  if (issues.length > 0) {
105790
106169
  const messages = issues.map(i => i.getKey() + ", " +
105791
106170
  i.getMessage() + ", " +
@@ -105852,7 +106231,7 @@ function escapeNamespaceFilename(filename) {
105852
106231
  return filename.replace(/\//g, "%23");
105853
106232
  }
105854
106233
  class Initialization {
105855
- script(reg, dbSetup, options, useImport) {
106234
+ script(reg, dbSetup, options, useImport, pluginOutputs) {
105856
106235
  let ret = "";
105857
106236
  if (useImport === true) {
105858
106237
  ret = `/* eslint-disable import/newline-after-import */
@@ -105895,13 +106274,13 @@ globalThis.abap = new runtime.ABAP();\n`;
105895
106274
  }
105896
106275
  ret += `}\n\n`;
105897
106276
  ret += `await initializeABAP();\n\n`;
105898
- ret += `${this.buildImports(reg, useImport, options)}`;
106277
+ ret += `${this.buildImports(reg, useImport, options, pluginOutputs)}`;
105899
106278
  if (options?.setup?.postFunction !== undefined) {
105900
106279
  ret += `\n\nawait setup.${options?.setup?.postFunction}();\n`;
105901
106280
  }
105902
106281
  return ret;
105903
106282
  }
105904
- buildImports(reg, useImport, options) {
106283
+ buildImports(reg, useImport, options, pluginOutputs) {
105905
106284
  // note: ES modules are hoised, so use the dynamic import(), due to setting of globalThis.abap
105906
106285
  // some sorting required: eg. a class constructor using constant from interface
105907
106286
  const list = [];
@@ -105914,6 +106293,9 @@ globalThis.abap = new runtime.ABAP();\n`;
105914
106293
  return `await import("./${filename}.mjs");`;
105915
106294
  }
105916
106295
  };
106296
+ for (const pluginOutput of pluginOutputs || []) {
106297
+ list.push(imp(pluginOutput.filename.replace(/\.mjs$/i, "")));
106298
+ }
105917
106299
  for (const obj of reg.getObjects()) {
105918
106300
  if (obj instanceof abaplint.Objects.Table
105919
106301
  || obj instanceof abaplint.Objects.DataElement
@@ -118893,6 +119275,74 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
118893
119275
  exports.Validation = exports.config = void 0;
118894
119276
  const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
118895
119277
  const types_1 = __webpack_require__(/*! ./types */ "./node_modules/@abaplint/transpiler/build/src/types.js");
119278
+ const defaultAllowedObjectTypes = [
119279
+ "APIS",
119280
+ "AUTH",
119281
+ "CLAS",
119282
+ "DEVC",
119283
+ "DOMA",
119284
+ "DTEL",
119285
+ "ENHO",
119286
+ "ENHS",
119287
+ "ENQU",
119288
+ "FUGR",
119289
+ "HTTP",
119290
+ "INTF",
119291
+ "IWMO",
119292
+ "IWOM",
119293
+ "IWPR",
119294
+ "IWSG",
119295
+ "IWSV",
119296
+ "MSAG",
119297
+ "NROB",
119298
+ "NSPC",
119299
+ "OA2P",
119300
+ "PARA",
119301
+ "PINF",
119302
+ "PROG",
119303
+ "WAPA",
119304
+ "SHLP",
119305
+ "SHMA",
119306
+ "SICF",
119307
+ "SMIM",
119308
+ "SPLO",
119309
+ "SRFC",
119310
+ "SUSC",
119311
+ "SUSH",
119312
+ "SUSO",
119313
+ "SXCI",
119314
+ "TABL",
119315
+ "TOBJ",
119316
+ "TRAN",
119317
+ "TTYP",
119318
+ "TYPE",
119319
+ "VCLS",
119320
+ "VIEW",
119321
+ "W3MI",
119322
+ "XSLT",
119323
+ "ZN01",
119324
+ "ZN02",
119325
+ "ZN03",
119326
+ "ZN04",
119327
+ "ZN05",
119328
+ "ZN06",
119329
+ "ZN07",
119330
+ "ZN08",
119331
+ "ZN09",
119332
+ "ZN10",
119333
+ "ZN11",
119334
+ "ZN12",
119335
+ "ZN13",
119336
+ "ZN14",
119337
+ "ZN15",
119338
+ "ZN16",
119339
+ "ZN17",
119340
+ "ZN18",
119341
+ "ZN19",
119342
+ "ZN20",
119343
+ "ZN21",
119344
+ "ZN22",
119345
+ ];
118896
119346
  exports.config = {
118897
119347
  "global": {
118898
119348
  "files": "/**/*.*",
@@ -118915,75 +119365,7 @@ exports.config = {
118915
119365
  },
118916
119366
  "parser_error": true,
118917
119367
  "allowed_object_types": {
118918
- "allowed": [
118919
- "APIS",
118920
- "AUTH",
118921
- "CLAS",
118922
- "DEVC",
118923
- "DOMA",
118924
- "DTEL",
118925
- "ENHO",
118926
- "ENHS",
118927
- "ENQU",
118928
- "FUGR",
118929
- "HTTP",
118930
- "INTF",
118931
- "IWMO",
118932
- "IWOM",
118933
- "IWPR",
118934
- "IWSG",
118935
- "IWSV",
118936
- "MSAG",
118937
- "NROB",
118938
- "NSPC",
118939
- "OA2P",
118940
- "PARA",
118941
- "PINF",
118942
- "PROG",
118943
- "WAPA",
118944
- "SHLP",
118945
- "SHMA",
118946
- "SICF",
118947
- "SMIM",
118948
- "SMIM",
118949
- "SPLO",
118950
- "SRFC",
118951
- "SUSC",
118952
- "SUSH",
118953
- "SUSO",
118954
- "SXCI",
118955
- "TABL",
118956
- "TOBJ",
118957
- "TRAN",
118958
- "TTYP",
118959
- "TYPE",
118960
- "VCLS",
118961
- "VIEW",
118962
- "W3MI",
118963
- "XSLT",
118964
- "ZN01",
118965
- "ZN02",
118966
- "ZN03",
118967
- "ZN04",
118968
- "ZN05",
118969
- "ZN06",
118970
- "ZN07",
118971
- "ZN08",
118972
- "ZN09",
118973
- "ZN10",
118974
- "ZN11",
118975
- "ZN12",
118976
- "ZN13",
118977
- "ZN14",
118978
- "ZN15",
118979
- "ZN16",
118980
- "ZN17",
118981
- "ZN18",
118982
- "ZN19",
118983
- "ZN20",
118984
- "ZN21",
118985
- "ZN22",
118986
- ],
119368
+ "allowed": defaultAllowedObjectTypes,
118987
119369
  },
118988
119370
  "unknown_types": true,
118989
119371
  "ambiguous_statement": true,
@@ -119000,8 +119382,10 @@ exports.config = {
119000
119382
  // hmm this ^ is okay? since lines will be prefixed with "abap.builtin"?
119001
119383
  class Validation {
119002
119384
  options;
119003
- constructor(options) {
119385
+ plugin;
119386
+ constructor(options, plugin) {
119004
119387
  this.options = options;
119388
+ this.plugin = plugin;
119005
119389
  }
119006
119390
  run(reg) {
119007
119391
  if (this.options?.ignoreSyntaxCheck === true) {
@@ -119011,6 +119395,13 @@ class Validation {
119011
119395
  exports.config.rules.check_syntax = true;
119012
119396
  }
119013
119397
  exports.config.rules.forbidden_identifier.check = ["^unique\\d+$"];
119398
+ const allowed = [...defaultAllowedObjectTypes];
119399
+ for (const type of this.plugin?.objectTypes() || []) {
119400
+ if (allowed.includes(type.toUpperCase()) === false) {
119401
+ allowed.push(type.toUpperCase());
119402
+ }
119403
+ }
119404
+ exports.config.rules.allowed_object_types.allowed = allowed;
119014
119405
  if (this.options?.unknownTypes === types_1.UnknownTypesEnum.runtimeError) {
119015
119406
  // this is not a constant, just a regex that happens to not match anything
119016
119407
  exports.config.syntax.errorNamespace = "VOID_EVERYTHING";
@@ -126121,6 +126512,17 @@ module.exports = require("fs");
126121
126512
 
126122
126513
  /***/ },
126123
126514
 
126515
+ /***/ "module"
126516
+ /*!*************************!*\
126517
+ !*** external "module" ***!
126518
+ \*************************/
126519
+ (module) {
126520
+
126521
+ "use strict";
126522
+ module.exports = require("module");
126523
+
126524
+ /***/ },
126525
+
126124
126526
  /***/ "node:fs/promises"
126125
126527
  /*!***********************************!*\
126126
126528
  !*** external "node:fs/promises" ***!