@abaplint/cli 2.119.56 → 2.119.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/cli.js +132 -37
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -1811,6 +1811,7 @@ exports.verNotLang = verNotLang;
1811
1811
  exports.failCombinator = failCombinator;
1812
1812
  exports.failStar = failStar;
1813
1813
  exports.stopBefore = stopBefore;
1814
+ exports.stopBefore1 = stopBefore1;
1814
1815
  const Tokens = __importStar(__webpack_require__(/*! ../1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js"));
1815
1816
  const nodes_1 = __webpack_require__(/*! ../nodes */ "../core/build/src/abap/nodes/index.js");
1816
1817
  const version_1 = __webpack_require__(/*! ../../version */ "../core/build/src/version.js");
@@ -2791,6 +2792,29 @@ class StopBefore2 {
2791
2792
  function stopBefore(t1, t2) {
2792
2793
  return new StopBefore2(t1, t2);
2793
2794
  }
2795
+ class StopBefore1 {
2796
+ constructor(words) { this.words = words.map(w => w.toUpperCase()); }
2797
+ listKeywords() { return []; }
2798
+ getUsing() { return []; }
2799
+ run(r) {
2800
+ var _a;
2801
+ const result = [];
2802
+ for (const input of r) {
2803
+ const next = (_a = input.peek()) === null || _a === void 0 ? void 0 : _a.getUpperStr();
2804
+ if (next !== undefined && this.words.includes(next)) {
2805
+ continue;
2806
+ }
2807
+ result.push(input);
2808
+ }
2809
+ return result;
2810
+ }
2811
+ railroad() { return "Railroad.Terminal('stopBefore(" + this.words.join("|") + ")')"; }
2812
+ toStr() { return "stopBefore(" + this.words.join(",") + ")"; }
2813
+ first() { return [""]; }
2814
+ }
2815
+ function stopBefore1(...words) {
2816
+ return new StopBefore1(words);
2817
+ }
2794
2818
  //# sourceMappingURL=combi.js.map
2795
2819
 
2796
2820
  /***/ },
@@ -3820,8 +3844,8 @@ const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_st
3820
3844
  const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
3821
3845
  class ComponentChainSimple extends combi_1.Expression {
3822
3846
  getRunnable() {
3823
- const chain = (0, combi_1.seq)(_1.ComponentName, (0, combi_1.starPrio)((0, combi_1.seq)(_1.ArrowOrDash, _1.ComponentName)));
3824
- const ret = (0, combi_1.seq)(chain, (0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength));
3847
+ const chain = (0, combi_1.starPrio)((0, combi_1.altPrio)(_1.Dereference, (0, combi_1.seq)(_1.ArrowOrDash, _1.ComponentName)));
3848
+ const ret = (0, combi_1.seq)(_1.ComponentName, chain, (0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength));
3825
3849
  return ret;
3826
3850
  }
3827
3851
  }
@@ -6763,7 +6787,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_st
6763
6787
  const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
6764
6788
  class ParameterListS extends combi_1.Expression {
6765
6789
  getRunnable() {
6766
- return (0, combi_1.plus)(_1.ParameterS);
6790
+ return (0, combi_1.plusPrio)(_1.ParameterS);
6767
6791
  }
6768
6792
  }
6769
6793
  exports.ParameterListS = ParameterListS;
@@ -10854,10 +10878,10 @@ class TypeTableKey extends combi_1.Expression {
10854
10878
  const uniqueness = (0, combi_1.alt)("NON-UNIQUE", "UNIQUE");
10855
10879
  const defaultKey = "DEFAULT KEY";
10856
10880
  const emptyKey = (0, combi_1.ver)(version_1.Release.v740sp02, "EMPTY KEY", { also: combi_1.AlsoIn.OpenABAP });
10857
- const components = (0, combi_1.plus)((0, combi_1.alt)((0, combi_1.seq)("WITH", (0, combi_1.failStar)()), _1.FieldSub));
10881
+ const components = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.stopBefore1)("WITH", "INITIAL", "WITHOUT"), (0, combi_1.stopBefore)("READ", "-"), _1.FieldSub));
10858
10882
  const further = (0, combi_1.seq)((0, combi_1.alt)("WITHOUT", "WITH"), "FURTHER SECONDARY KEYS");
10859
10883
  const alias = (0, combi_1.seq)("ALIAS", _1.Field);
10860
- const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, (0, combi_1.opt)(alias), "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
10884
+ const key = (0, combi_1.seq)("WITH", (0, combi_1.optPrio)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.altPrio)((0, combi_1.seq)(_1.Field, (0, combi_1.opt)(alias), "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
10861
10885
  return key;
10862
10886
  }
10863
10887
  }
@@ -10926,7 +10950,7 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/exp
10926
10950
  const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
10927
10951
  class ValueBody extends combi_1.Expression {
10928
10952
  getRunnable() {
10929
- const strucOrTab = (0, combi_1.seq)((0, combi_1.optPrio)(_1.Let), (0, combi_1.optPrio)(_1.ValueBase), (0, combi_1.star)(_1.For), (0, combi_1.plusPrio)((0, combi_1.altPrio)(_1.FieldAssignment, _1.ValueBodyLine)));
10953
+ const strucOrTab = (0, combi_1.seq)((0, combi_1.optPrio)(_1.Let), (0, combi_1.optPrio)(_1.ValueBase), (0, combi_1.starPrio)(_1.For), (0, combi_1.plusPrio)((0, combi_1.altPrio)(_1.FieldAssignment, _1.ValueBodyLine)));
10930
10954
  const tabdef = (0, combi_1.ver)(version_1.Release.v740sp08, (0, combi_1.altPrio)("OPTIONAL", (0, combi_1.seq)("DEFAULT", _1.Source)), { also: combi_1.AlsoIn.OpenABAP });
10931
10955
  return (0, combi_1.optPrio)((0, combi_1.altPrio)(strucOrTab, (0, combi_1.seq)(_1.Source, (0, combi_1.optPrio)(tabdef))));
10932
10956
  }
@@ -29267,6 +29291,15 @@ class ComponentChain {
29267
29291
  if (i === 0 && child.concatTokens().toUpperCase() === "TABLE_LINE") {
29268
29292
  continue;
29269
29293
  }
29294
+ else if (child.get() instanceof Expressions.Dereference) {
29295
+ if (!(context instanceof basic_1.DataReference)) {
29296
+ const message = "Not a data reference, cannot be dereferenced";
29297
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
29298
+ return void_type_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
29299
+ }
29300
+ context = context.getType();
29301
+ continue;
29302
+ }
29270
29303
  else if (child.get() instanceof Expressions.ArrowOrDash) {
29271
29304
  const concat = child.concatTokens();
29272
29305
  if (concat === "-") {
@@ -52664,8 +52697,9 @@ var Mode;
52664
52697
  (function (Mode) {
52665
52698
  Mode[Mode["Default"] = 0] = "Default";
52666
52699
  Mode[Mode["String"] = 1] = "String";
52667
- Mode[Mode["SingleLineComment"] = 2] = "SingleLineComment";
52668
- Mode[Mode["MultiLineComment"] = 3] = "MultiLineComment";
52700
+ Mode[Mode["DoubleQuoteString"] = 2] = "DoubleQuoteString";
52701
+ Mode[Mode["SingleLineComment"] = 3] = "SingleLineComment";
52702
+ Mode[Mode["MultiLineComment"] = 4] = "MultiLineComment";
52669
52703
  })(Mode || (Mode = {}));
52670
52704
  class Result {
52671
52705
  constructor() {
@@ -52725,6 +52759,23 @@ class CDSLexer {
52725
52759
  }
52726
52760
  continue;
52727
52761
  }
52762
+ // double-quote string handling
52763
+ if (mode === Mode.DoubleQuoteString) {
52764
+ build += next;
52765
+ if (next === "\\" && nextNext === "\"") {
52766
+ build += stream.takeNext();
52767
+ col++;
52768
+ }
52769
+ else if (next === "\"" && nextNext === "\"") {
52770
+ build += stream.takeNext();
52771
+ col++;
52772
+ }
52773
+ else if (next === "\"") {
52774
+ build = result.add(build, row, col, mode);
52775
+ mode = Mode.Default;
52776
+ }
52777
+ continue;
52778
+ }
52728
52779
  // single line comment handling
52729
52780
  if (mode === Mode.SingleLineComment) {
52730
52781
  if (next === "\n") {
@@ -52771,6 +52822,11 @@ class CDSLexer {
52771
52822
  mode = Mode.String;
52772
52823
  build += next;
52773
52824
  break;
52825
+ case "\"":
52826
+ build = result.add(build, row, col, mode);
52827
+ mode = Mode.DoubleQuoteString;
52828
+ build += next;
52829
+ break;
52774
52830
  case " ":
52775
52831
  case "\t":
52776
52832
  build = result.add(build, row, col, mode);
@@ -53185,7 +53241,9 @@ class CDSAs extends combi_1.Expression {
53185
53241
  getRunnable() {
53186
53242
  const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
53187
53243
  const colonType = (0, combi_1.seq)(":", (0, combi_1.altPrio)(_1.CDSType, _1.CDSName, "LOCALIZED"));
53188
- return (0, combi_1.seq)("AS", _1.CDSName, (0, combi_1.optPrio)((0, combi_1.altPrio)(redirected, colonType)));
53244
+ const ident = (0, combi_1.regex)(/^\w+$/);
53245
+ const namespacedAlias = (0, combi_1.seq)(ident, "/", ident, "/", ident);
53246
+ return (0, combi_1.seq)("AS", (0, combi_1.altPrio)(namespacedAlias, _1.CDSName), (0, combi_1.optPrio)((0, combi_1.altPrio)(redirected, colonType)));
53189
53247
  }
53190
53248
  }
53191
53249
  exports.CDSAs = CDSAs;
@@ -53219,8 +53277,9 @@ class CDSAssociation extends combi_1.Expression {
53219
53277
  // Numeric OF form: "association of [0..1] to Target on ..."
53220
53278
  const ofNumericForm = (0, combi_1.seq)("ASSOCIATION", "OF", numericCardinality, "TO", _1.CDSRelation, "ON", _1.CDSCondition);
53221
53279
  // "association [0..1] to Target as _Alias on condition" — standard form
53280
+ const parentForm = (0, combi_1.seq)("ASSOCIATION", "TO", "PARENT", _1.CDSRelation);
53222
53281
  const standardForm = (0, combi_1.seq)("ASSOCIATION", (0, combi_1.optPrio)(cds_cardinality_1.CDSCardinality), "TO", (0, combi_1.opt)((0, combi_1.altPrio)(textCardinality, "PARENT")), _1.CDSRelation, "ON", _1.CDSCondition, (0, combi_1.opt)((0, combi_1.seq)("WITH", "DEFAULT", "FILTER", _1.CDSCondition)));
53223
- return (0, combi_1.altPrio)(ofTextForm, ofNumericForm, standardForm);
53282
+ return (0, combi_1.altPrio)(ofTextForm, ofNumericForm, standardForm, parentForm);
53224
53283
  }
53225
53284
  }
53226
53285
  exports.CDSAssociation = CDSAssociation;
@@ -53477,11 +53536,9 @@ class CDSDefineHierarchy extends combi_1.Expression {
53477
53536
  const directory = (0, combi_1.seq)("DIRECTORY", _1.CDSName, "FILTER", "BY", _1.CDSCondition);
53478
53537
  // DATE PERIOD: period from <field> to <field> [valid from :p to :p]
53479
53538
  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)));
53480
- // DEPTH accepts an integer literal or a parameter reference (:param)
53481
- const depthValue = (0, combi_1.altPrio)(_1.CDSInteger, _1.CDSPrefixedName);
53482
- // LOAD mode: BULK, INCREMENTAL, or a parameter reference ($parameters.p_load)
53539
+ const depthValue = (0, combi_1.altPrio)(_1.CDSString, _1.CDSInteger, _1.CDSPrefixedName);
53483
53540
  const loadMode = (0, combi_1.altPrio)("BULK", "INCREMENTAL", _1.CDSPrefixedName);
53484
- 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"))));
53541
+ 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)("DEPTH", depthValue)), (0, combi_1.opt)((0, combi_1.seq)("NODETYPE", _1.CDSName)), (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"))));
53485
53542
  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)(";"));
53486
53543
  }
53487
53544
  }
@@ -53529,10 +53586,10 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index
53529
53586
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
53530
53587
  class CDSDefineTableEntity extends combi_1.Expression {
53531
53588
  getRunnable() {
53532
- const nullability = (0, combi_1.optPrio)((0, combi_1.alt)("NOT NULL", "NULL"));
53533
- 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, ";");
53534
- const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53535
- const inlineBody = (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp));
53589
+ // Inline `{ ... }` body: one or more table-field entries. Each entry is
53590
+ // wrapped in a CDSTableField node so downstream tooling can pair each
53591
+ // field name with its own annotations.
53592
+ const inlineBody = (0, combi_1.plus)(_1.CDSTableField);
53536
53593
  const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
53537
53594
  const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
53538
53595
  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));
@@ -53587,8 +53644,10 @@ const cds_with_parameters_1 = __webpack_require__(/*! ./cds_with_parameters */ "
53587
53644
  class CDSDefineView extends combi_1.Expression {
53588
53645
  getRunnable() {
53589
53646
  const columnAlias = (0, combi_1.seq)("(", cds_name_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(",", cds_name_1.CDSName)), ")");
53590
- 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
53591
- (0, combi_1.opt)(";"));
53647
+ const parenSelect = (0, combi_1.seq)("(", cds_select_1.CDSSelect, ")");
53648
+ const unionBranch = (0, combi_1.altPrio)(parenSelect, cds_select_1.CDSSelect);
53649
+ const topLevelSelect = (0, combi_1.altPrio)((0, combi_1.seq)(parenSelect, (0, combi_1.star)((0, combi_1.altPrio)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), unionBranch), (0, combi_1.seq)("EXCEPT", unionBranch), (0, combi_1.seq)("INTERSECT", unionBranch)))), cds_select_1.CDSSelect);
53650
+ 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", topLevelSelect, (0, combi_1.opt)((0, combi_1.seq)("WITH", "HIERARCHY", cds_name_1.CDSName)), (0, combi_1.opt)(";"));
53592
53651
  }
53593
53652
  }
53594
53653
  exports.CDSDefineView = CDSDefineView;
@@ -53615,9 +53674,13 @@ class CDSElement extends combi_1.Expression {
53615
53674
  const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
53616
53675
  const colonThing = (0, combi_1.seq)(":", (0, combi_1.altPrio)(_1.CDSType, _1.CDSName, "LOCALIZED"));
53617
53676
  const extensionWildcard = (0, combi_1.seq)("$extension", ".", "*");
53618
- const includeElement = (0, combi_1.seq)("INCLUDE", _1.CDSPrefixedName);
53677
+ const excludingNames = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSName)));
53678
+ const excluding = (0, combi_1.seq)("EXCLUDING", "{", excludingNames, "}");
53679
+ const includeElement = (0, combi_1.seq)("INCLUDE", _1.CDSPrefixedName, (0, combi_1.optPrio)(excluding), (0, combi_1.optPrio)("SIGNATURE ONLY"));
53619
53680
  const typedVirtual = (0, combi_1.seq)("VIRTUAL", _1.CDSName, ":", _1.CDSType);
53620
- 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);
53681
+ const pathSegment = (0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName, "*"), (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.CDSParametersSelect, _1.CDSParameters)));
53682
+ const funcWithPath = (0, combi_1.seq)(_1.CDSFunction, (0, combi_1.plusPrio)(pathSegment));
53683
+ const body = (0, combi_1.altPrio)(extensionWildcard, includeElement, _1.CDSArithmetics, _1.CDSAggregate, _1.CDSString, _1.CDSArithParen, funcWithPath, _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);
53621
53684
  const elementBody = (0, combi_1.altPrio)(typedVirtual, (0, combi_1.seq)((0, combi_1.altPrio)("KEY", "VIRTUAL"), body), body);
53622
53685
  return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), elementBody, (0, combi_1.optPrio)(cds_as_1.CDSAs));
53623
53686
  }
@@ -53644,7 +53707,9 @@ class CDSExtendView extends combi_1.Expression {
53644
53707
  const namedot = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)), (0, combi_1.optPrio)(_1.CDSAs));
53645
53708
  const valueNested = (0, combi_1.seq)("{", namedot, (0, combi_1.star)((0, combi_1.seq)(",", namedot)), "}");
53646
53709
  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);
53647
- 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)(";"));
53710
+ const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
53711
+ const elementNested = (0, combi_1.seq)("{", (0, combi_1.altPrio)("*", elementList), "}");
53712
+ 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), (0, combi_1.star)(_1.CDSAssociation), (0, combi_1.altPrio)(elementNested, valueNested), (0, combi_1.opt)(";"));
53648
53713
  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, ";");
53649
53714
  const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53650
53715
  const entityBody = (0, combi_1.seq)("{", (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp)), "}");
@@ -53934,7 +53999,9 @@ class CDSParametersSelect extends combi_1.Expression {
53934
53999
  getRunnable() {
53935
54000
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
53936
54001
  const value = (0, combi_1.alt)(_1.CDSInteger, name, _1.CDSString);
53937
- const nameValue = (0, combi_1.seq)(name, ":", value);
54002
+ const colonPair = (0, combi_1.seq)(name, ":", value, (0, combi_1.optPrio)("DEFAULT"));
54003
+ const arrowPair = (0, combi_1.seq)(name, "=", ">", value);
54004
+ const nameValue = (0, combi_1.altPrio)(colonPair, arrowPair);
53938
54005
  return (0, combi_1.seq)("(", nameValue, (0, combi_1.star)((0, combi_1.seq)(",", nameValue)), ")");
53939
54006
  }
53940
54007
  }
@@ -53968,13 +54035,13 @@ class CDSPrefixedName extends combi_1.Expression {
53968
54035
  const cardinalityJoin = (0, combi_1.seq)("[", cardSpec, ":", joinType, "]");
53969
54036
  const cardinalityJoinWhere = (0, combi_1.seq)("[", cardSpec, ":", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
53970
54037
  const joinWhere = (0, combi_1.seq)("[", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
53971
- const textCard = (0, combi_1.altPrio)("TO EXACT ONE", "TO ONE", "TO MANY");
54038
+ const textCard = (0, combi_1.altPrio)("MANY TO EXACT ONE", "MANY TO ONE", "ONE TO MANY", "ONE TO ONE", "TO EXACT ONE", "TO ONE", "TO MANY");
53972
54039
  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))), "]");
53973
54040
  const cardNum = (0, combi_1.altPrio)(cds_integer_1.CDSInteger, "*");
53974
54041
  const rangeCard = (0, combi_1.seq)(cds_integer_1.CDSInteger, ".", ".", cardNum);
53975
54042
  const rangeCardFilter = (0, combi_1.seq)("[", rangeCard, ":", cds_condition_1.CDSCondition, "]");
53976
54043
  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, "]"));
53977
- 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));
54044
+ 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));
53978
54045
  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));
53979
54046
  }
53980
54047
  }
@@ -54019,7 +54086,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../cor
54019
54086
  class CDSRelation extends combi_1.Expression {
54020
54087
  getRunnable() {
54021
54088
  const pre = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w_]+$/), "/");
54022
- return (0, combi_1.seq)((0, combi_1.opt)(pre), (0, combi_1.regex)(/^[\w_]+$/), (0, combi_1.opt)(_1.CDSAs));
54089
+ return (0, combi_1.seq)((0, combi_1.opt)(pre), (0, combi_1.regex)(/^[\w_]+$/), (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs));
54023
54090
  }
54024
54091
  }
54025
54092
  exports.CDSRelation = CDSRelation;
@@ -54047,11 +54114,12 @@ class CDSSelect extends combi_1.Expression {
54047
54114
  const distinct = (0, combi_1.str)("DISTINCT");
54048
54115
  const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
54049
54116
  const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
54050
- const aspectBinding = (0, combi_1.seq)(_1.CDSPrefixedName, "=", ">", _1.CDSPrefixedName);
54051
- const bindAspect = (0, combi_1.seq)("BIND", "ASPECT", _1.CDSName, "(", aspectBinding, (0, combi_1.starPrio)((0, combi_1.seq)(",", aspectBinding)), ")");
54117
+ const aspectValue = (0, combi_1.altPrio)(_1.CDSString, _1.CDSPrefixedName);
54118
+ const aspectBinding = (0, combi_1.seq)(_1.CDSPrefixedName, "=", ">", aspectValue);
54119
+ const bindAspect = (0, combi_1.seq)("BIND", "ASPECT", _1.CDSName, "(", aspectBinding, (0, combi_1.starPrio)((0, combi_1.seq)(",", aspectBinding)), ")", (0, combi_1.optPrio)((0, combi_1.seq)("AS", _1.CDSName)));
54052
54120
  const parenSelect = (0, combi_1.seq)("(", CDSSelect, ")");
54053
54121
  const unionBranch = (0, combi_1.altPrio)(parenSelect, CDSSelect);
54054
- 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))));
54122
+ 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.starPrio)(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))));
54055
54123
  }
54056
54124
  }
54057
54125
  exports.CDSSelect = CDSSelect;
@@ -54074,10 +54142,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../cor
54074
54142
  class CDSSource extends combi_1.Expression {
54075
54143
  getRunnable() {
54076
54144
  const staticFilter = (0, combi_1.seq)("[", _1.CDSCondition, "]");
54077
- // Dotted path: T._Assoc association path as FROM source
54078
- const dottedName = (0, combi_1.seq)(_1.CDSName, ".", _1.CDSName);
54079
- const namedSource = (0, combi_1.altPrio)(dottedName, _1.CDSName);
54080
- 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)));
54145
+ const singleSource = (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.optPrio)(_1.CDSParametersSelect), (0, combi_1.optPrio)(staticFilter), (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
54081
54146
  const funcSingleSource = (0, combi_1.seq)(_1.CDSFunction, (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
54082
54147
  const parenSource = (0, combi_1.seq)("(", (0, combi_1.altPrio)(CDSSource, singleSource), (0, combi_1.star)(_1.CDSJoin), ")");
54083
54148
  return (0, combi_1.altPrio)(parenSource, funcSingleSource, singleSource);
@@ -54101,8 +54166,8 @@ exports.CDSString = void 0;
54101
54166
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
54102
54167
  class CDSString extends combi_1.Expression {
54103
54168
  getRunnable() {
54104
- const reg = (0, combi_1.regex)(/^'(?:[^'\\]|''|\\'|\\\\|\\(?!'))*'$/);
54105
- 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);
54169
+ const reg = (0, combi_1.regex)(/^(?:'(?:[^'\\]|''|\\'|\\\\|\\(?!'))*'|"(?:[^"\\]|""|\\"|\\\\|\\(?!"))*")$/);
54170
+ const abapTypeName = (0, combi_1.regex)(/^(?:int[1-9]|int8|sstring|sstr|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);
54106
54171
  const abap = (0, combi_1.seq)("abap", ".", abapTypeName, (0, combi_1.optPrio)((0, combi_1.seq)("(", (0, combi_1.regex)(/^\d+$/), ")")), reg);
54107
54172
  return (0, combi_1.altPrio)(abap, reg);
54108
54173
  }
@@ -54112,6 +54177,35 @@ exports.CDSString = CDSString;
54112
54177
 
54113
54178
  /***/ },
54114
54179
 
54180
+ /***/ "../core/build/src/cds/expressions/cds_table_field.js"
54181
+ /*!************************************************************!*\
54182
+ !*** ../core/build/src/cds/expressions/cds_table_field.js ***!
54183
+ \************************************************************/
54184
+ (__unused_webpack_module, exports, __webpack_require__) {
54185
+
54186
+ "use strict";
54187
+
54188
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
54189
+ exports.CDSTableField = void 0;
54190
+ const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index.js");
54191
+ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
54192
+ // A single field or association/composition inside a `define table entity { ... }`
54193
+ // inline body. Wraps annotations + name + type together so tooling can iterate
54194
+ // per-field with associated field-level annotations (matches the CDSElement
54195
+ // shape used for select-list elements).
54196
+ class CDSTableField extends combi_1.Expression {
54197
+ getRunnable() {
54198
+ const nullability = (0, combi_1.optPrio)((0, combi_1.alt)("NOT NULL", "NULL"));
54199
+ const field = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.str)("KEY")), _1.CDSName, ":", _1.CDSType, nullability);
54200
+ const assocOrComp = (0, combi_1.seq)(_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation));
54201
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, assocOrComp), ";");
54202
+ }
54203
+ }
54204
+ exports.CDSTableField = CDSTableField;
54205
+ //# sourceMappingURL=cds_table_field.js.map
54206
+
54207
+ /***/ },
54208
+
54115
54209
  /***/ "../core/build/src/cds/expressions/cds_type.js"
54116
54210
  /*!*****************************************************!*\
54117
54211
  !*** ../core/build/src/cds/expressions/cds_type.js ***!
@@ -54243,6 +54337,7 @@ __exportStar(__webpack_require__(/*! ./cds_relation */ "../core/build/src/cds/ex
54243
54337
  __exportStar(__webpack_require__(/*! ./cds_select */ "../core/build/src/cds/expressions/cds_select.js"), exports);
54244
54338
  __exportStar(__webpack_require__(/*! ./cds_source */ "../core/build/src/cds/expressions/cds_source.js"), exports);
54245
54339
  __exportStar(__webpack_require__(/*! ./cds_string */ "../core/build/src/cds/expressions/cds_string.js"), exports);
54340
+ __exportStar(__webpack_require__(/*! ./cds_table_field */ "../core/build/src/cds/expressions/cds_table_field.js"), exports);
54246
54341
  __exportStar(__webpack_require__(/*! ./cds_type */ "../core/build/src/cds/expressions/cds_type.js"), exports);
54247
54342
  __exportStar(__webpack_require__(/*! ./cds_where */ "../core/build/src/cds/expressions/cds_where.js"), exports);
54248
54343
  __exportStar(__webpack_require__(/*! ./cds_with_parameters */ "../core/build/src/cds/expressions/cds_with_parameters.js"), exports);
@@ -68572,7 +68667,7 @@ class Registry {
68572
68667
  }
68573
68668
  static abaplintVersion() {
68574
68669
  // magic, see build script "version.js"
68575
- return "2.119.56";
68670
+ return "2.119.57";
68576
68671
  }
68577
68672
  getDDICReferences() {
68578
68673
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.56",
3
+ "version": "2.119.57",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.119.56",
42
+ "@abaplint/core": "^2.119.57",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",