@abaplint/cli 2.119.55 → 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 +269 -69
  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
  /***/ },
@@ -2893,6 +2917,9 @@ class ExpandMacros {
2893
2917
  this.globalMacros = globalMacros;
2894
2918
  this.reg = reg;
2895
2919
  }
2920
+ listMacroNames() {
2921
+ return this.macros.listMacroNames();
2922
+ }
2896
2923
  find(statements, file, clear = true) {
2897
2924
  var _a, _b, _c;
2898
2925
  let nameToken = undefined;
@@ -2946,7 +2973,7 @@ class ExpandMacros {
2946
2973
  for (const statement of statements) {
2947
2974
  const type = statement.get();
2948
2975
  if (type instanceof _statement_1.Unknown || type instanceof _statement_1.MacroCall) {
2949
- const macroName = this.findName(statement.getTokens());
2976
+ const macroName = ExpandMacros.findName(statement.getTokens());
2950
2977
  if (macroName && this.macros.isMacro(macroName)) {
2951
2978
  const filename = this.macros.getMacroFilename(macroName);
2952
2979
  if (filename) {
@@ -3038,7 +3065,7 @@ class ExpandMacros {
3038
3065
  }
3039
3066
  return result;
3040
3067
  }
3041
- findName(tokens) {
3068
+ static findName(tokens) {
3042
3069
  let macroName = undefined;
3043
3070
  let previous = undefined;
3044
3071
  for (const i of tokens) {
@@ -3094,40 +3121,40 @@ function commonDerivedTypes() {
3094
3121
  const entity = (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation);
3095
3122
  // more-specific keyword phrases (e.g. "FAILED LATE") must precede less-specific ones ("FAILED")
3096
3123
  return [
3097
- (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("FAILED LATE", entity)),
3098
- (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("MAPPED LATE", entity)),
3099
- (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("REPORTED LATE", entity)),
3100
- (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("FAILED EARLY", entity)),
3101
- (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("MAPPED EARLY", entity)),
3102
- (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("REPORTED EARLY", entity)),
3103
- (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FAILED", entity)),
3104
- (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("MAPPED", entity)),
3105
- (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("REPORTED", entity)),
3106
- (0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("FUNCTION IMPORT", entity)),
3107
- (0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("FUNCTION RESULT", entity)),
3108
- (0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("ACTION RESULT", entity)),
3109
- (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION KEY", entity)),
3110
- (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION REQUEST", entity)),
3111
- (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION RESULT", entity)),
3112
- (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES KEY", entity)),
3113
- (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES REQUEST", entity)),
3114
- (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES RESULT", entity)),
3115
- (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("AUTHORIZATION RESULT", entity)),
3116
- (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("AUTHORIZATION KEY", entity)),
3117
- (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES RESULT", entity)),
3118
- (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES KEY", entity)),
3119
- (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("PERMISSIONS KEY", entity)),
3124
+ (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("FAILED LATE", entity), { also: combi_1.AlsoIn.OpenABAP }),
3125
+ (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("MAPPED LATE", entity), { also: combi_1.AlsoIn.OpenABAP }),
3126
+ (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("REPORTED LATE", entity), { also: combi_1.AlsoIn.OpenABAP }),
3127
+ (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("FAILED EARLY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3128
+ (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("MAPPED EARLY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3129
+ (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("REPORTED EARLY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3130
+ (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FAILED", entity), { also: combi_1.AlsoIn.OpenABAP }),
3131
+ (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("MAPPED", entity), { also: combi_1.AlsoIn.OpenABAP }),
3132
+ (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("REPORTED", entity), { also: combi_1.AlsoIn.OpenABAP }),
3133
+ (0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("FUNCTION IMPORT", entity), { also: combi_1.AlsoIn.OpenABAP }),
3134
+ (0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("FUNCTION RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }),
3135
+ (0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("ACTION RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }),
3136
+ (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION KEY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3137
+ (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }),
3138
+ (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE AUTHORIZATION RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }),
3139
+ (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES KEY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3140
+ (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES REQUEST", entity), { also: combi_1.AlsoIn.OpenABAP }),
3141
+ (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("INSTANCE FEATURES RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }),
3142
+ (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("AUTHORIZATION RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }),
3143
+ (0, combi_1.ver)(version_1.Release.v781, (0, combi_1.seq)("AUTHORIZATION KEY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3144
+ (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES RESULT", entity), { also: combi_1.AlsoIn.OpenABAP }),
3145
+ (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("FEATURES KEY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3146
+ (0, combi_1.ver)(version_1.Release.v780, (0, combi_1.seq)("PERMISSIONS KEY", entity), { also: combi_1.AlsoIn.OpenABAP }),
3120
3147
  (0, combi_1.seq)("READ IMPORT", entity),
3121
3148
  (0, combi_1.seq)("READ RESULT", entity),
3122
- (0, combi_1.ver)(version_1.Release.v915, (0, combi_1.seq)("READ CHANGES", entity)),
3149
+ (0, combi_1.ver)(version_1.Release.v915, (0, combi_1.seq)("READ CHANGES", entity), { also: combi_1.AlsoIn.OpenABAP }),
3123
3150
  (0, combi_1.seq)("CREATE", entity),
3124
3151
  (0, combi_1.seq)("DELETE", entity),
3125
3152
  (0, combi_1.seq)("UPDATE", entity),
3126
- (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("LOCK", entity)),
3127
- (0, combi_1.ver)(version_1.Release.v775, (0, combi_1.seq)("KEY OF", entity)),
3128
- (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("DETERMINATION", entity)),
3129
- (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("VALIDATION", entity)),
3130
- (0, combi_1.ver)(version_1.Release.v778, (0, combi_1.seq)("CHANGE", entity)),
3153
+ (0, combi_1.ver)(version_1.Release.v777, (0, combi_1.seq)("LOCK", entity), { also: combi_1.AlsoIn.OpenABAP }),
3154
+ (0, combi_1.ver)(version_1.Release.v775, (0, combi_1.seq)("KEY OF", entity), { also: combi_1.AlsoIn.OpenABAP }),
3155
+ (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("DETERMINATION", entity), { also: combi_1.AlsoIn.OpenABAP }),
3156
+ (0, combi_1.ver)(version_1.Release.v776, (0, combi_1.seq)("VALIDATION", entity), { also: combi_1.AlsoIn.OpenABAP }),
3157
+ (0, combi_1.ver)(version_1.Release.v778, (0, combi_1.seq)("CHANGE", entity), { also: combi_1.AlsoIn.OpenABAP }),
3131
3158
  ];
3132
3159
  }
3133
3160
  function derivedTypesAlt(...extra) {
@@ -3817,8 +3844,8 @@ const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_st
3817
3844
  const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
3818
3845
  class ComponentChainSimple extends combi_1.Expression {
3819
3846
  getRunnable() {
3820
- const chain = (0, combi_1.seq)(_1.ComponentName, (0, combi_1.starPrio)((0, combi_1.seq)(_1.ArrowOrDash, _1.ComponentName)));
3821
- 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));
3822
3849
  return ret;
3823
3850
  }
3824
3851
  }
@@ -6760,7 +6787,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "../core/build/src/abap/2_st
6760
6787
  const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/expressions/index.js");
6761
6788
  class ParameterListS extends combi_1.Expression {
6762
6789
  getRunnable() {
6763
- return (0, combi_1.plus)(_1.ParameterS);
6790
+ return (0, combi_1.plusPrio)(_1.ParameterS);
6764
6791
  }
6765
6792
  }
6766
6793
  exports.ParameterListS = ParameterListS;
@@ -10819,7 +10846,7 @@ class TypeTable extends combi_1.Expression {
10819
10846
  const typetable = (0, combi_1.alt)(generic, (0, combi_1.seq)(normal1, (0, combi_1.alt)((0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))), (0, combi_1.seq)((0, combi_1.plus)(type_table_key_1.TypeTableKey), (0, combi_1.optPrio)(initial))), (0, combi_1.optPrio)("VALUE IS INITIAL")));
10820
10847
  const occurs = (0, combi_1.seq)("OCCURS", (0, combi_1.altPrio)(_1.Integer, field_chain_1.FieldChain));
10821
10848
  const entity = (0, combi_1.alt)(_1.TypeName, _1.EntityAssociation);
10822
- const derivedTypes = (0, _derived_types_1.derivedTypesAlt)((0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("ACTION IMPORT", entity)), (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("READ LINK", entity)), (0, combi_1.ver)(version_1.Release.v787, (0, combi_1.seq)("EVENT", entity)));
10849
+ const derivedTypes = (0, _derived_types_1.derivedTypesAlt)((0, combi_1.ver)(version_1.Release.v773, (0, combi_1.seq)("ACTION IMPORT", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v774, (0, combi_1.seq)("READ LINK", entity), { also: combi_1.AlsoIn.OpenABAP }), (0, combi_1.ver)(version_1.Release.v787, (0, combi_1.seq)("EVENT", entity), { also: combi_1.AlsoIn.OpenABAP }));
10823
10850
  const derived = (0, combi_1.ver)(version_1.Release.v770, (0, combi_1.seq)("TABLE FOR", derivedTypes, (0, combi_1.optPrio)("VALUE IS INITIAL")), { also: combi_1.AlsoIn.OpenABAP });
10824
10851
  const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
10825
10852
  const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
@@ -10851,10 +10878,10 @@ class TypeTableKey extends combi_1.Expression {
10851
10878
  const uniqueness = (0, combi_1.alt)("NON-UNIQUE", "UNIQUE");
10852
10879
  const defaultKey = "DEFAULT KEY";
10853
10880
  const emptyKey = (0, combi_1.ver)(version_1.Release.v740sp02, "EMPTY KEY", { also: combi_1.AlsoIn.OpenABAP });
10854
- 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));
10855
10882
  const further = (0, combi_1.seq)((0, combi_1.alt)("WITHOUT", "WITH"), "FURTHER SECONDARY KEYS");
10856
10883
  const alias = (0, combi_1.seq)("ALIAS", _1.Field);
10857
- 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"));
10858
10885
  return key;
10859
10886
  }
10860
10887
  }
@@ -10923,7 +10950,7 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/abap/2_statements/exp
10923
10950
  const version_1 = __webpack_require__(/*! ../../../version */ "../core/build/src/version.js");
10924
10951
  class ValueBody extends combi_1.Expression {
10925
10952
  getRunnable() {
10926
- 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)));
10927
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 });
10928
10955
  return (0, combi_1.optPrio)((0, combi_1.altPrio)(strucOrTab, (0, combi_1.seq)(_1.Source, (0, combi_1.optPrio)(tabdef))));
10929
10956
  }
@@ -29264,6 +29291,15 @@ class ComponentChain {
29264
29291
  if (i === 0 && child.concatTokens().toUpperCase() === "TABLE_LINE") {
29265
29292
  continue;
29266
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
+ }
29267
29303
  else if (child.get() instanceof Expressions.ArrowOrDash) {
29268
29304
  const concat = child.concatTokens();
29269
29305
  if (concat === "-") {
@@ -47722,6 +47758,105 @@ exports.ArtifactsABAP = ArtifactsABAP;
47722
47758
 
47723
47759
  /***/ },
47724
47760
 
47761
+ /***/ "../core/build/src/abap/cross_include_macros.js"
47762
+ /*!******************************************************!*\
47763
+ !*** ../core/build/src/abap/cross_include_macros.js ***!
47764
+ \******************************************************/
47765
+ (__unused_webpack_module, exports, __webpack_require__) {
47766
+
47767
+ "use strict";
47768
+
47769
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
47770
+ exports.CrossIncludeMacros = void 0;
47771
+ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "../core/build/src/objects/_abap_object.js");
47772
+ const program_1 = __webpack_require__(/*! ../objects/program */ "../core/build/src/objects/program.js");
47773
+ const _statement_1 = __webpack_require__(/*! ./2_statements/statements/_statement */ "../core/build/src/abap/2_statements/statements/_statement.js");
47774
+ const expand_macros_1 = __webpack_require__(/*! ./2_statements/expand_macros */ "../core/build/src/abap/2_statements/expand_macros.js");
47775
+ const include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ "../core/build/src/utils/include_graph.js");
47776
+ // Macros can be defined in one include and used in a sibling include, connected
47777
+ // via the main program. Objects are parsed in isolation, so the sibling include
47778
+ // initially ends up with Unknown statements. This second pass finds the main
47779
+ // program(s) for such includes, collects the macro definitions visible there,
47780
+ // and re-parses the include with the macro names as extra global macros.
47781
+ class CrossIncludeMacros {
47782
+ constructor(reg) {
47783
+ this.reg = reg;
47784
+ }
47785
+ run() {
47786
+ const candidates = this.findCandidates();
47787
+ if (candidates.length === 0) {
47788
+ return;
47789
+ }
47790
+ const graph = new include_graph_1.IncludeGraph(this.reg);
47791
+ const config = this.reg.getConfig();
47792
+ const globalMacros = config.getSyntaxSetttings().globalMacros || [];
47793
+ for (const prog of candidates) {
47794
+ const mains = this.findMains(graph, prog);
47795
+ if (mains.size === 0) {
47796
+ continue;
47797
+ }
47798
+ const expand = new expand_macros_1.ExpandMacros(globalMacros, config.getRelease(), this.reg, config.getLanguageVersion());
47799
+ for (const main of mains) {
47800
+ for (const file of main.getABAPFiles()) {
47801
+ // find() follows INCLUDE statements, so this collects macros from the full include chain
47802
+ expand.find([...file.getStatements()], file, false);
47803
+ }
47804
+ }
47805
+ const macroNames = expand.listMacroNames();
47806
+ if (this.matchesUnknown(prog, new Set(macroNames))) {
47807
+ prog.setDirty();
47808
+ prog.parse(config.getRelease(), macroNames, this.reg, config.getLanguageVersion());
47809
+ }
47810
+ }
47811
+ }
47812
+ //////////////////////////////
47813
+ findCandidates() {
47814
+ const ret = [];
47815
+ for (const obj of this.reg.getObjects()) {
47816
+ if (!(obj instanceof program_1.Program) || obj.isInclude() === false) {
47817
+ continue;
47818
+ }
47819
+ for (const file of obj.getABAPFiles()) {
47820
+ if (file.getStatements().some(s => s.get() instanceof _statement_1.Unknown)) {
47821
+ ret.push(obj);
47822
+ break;
47823
+ }
47824
+ }
47825
+ }
47826
+ return ret;
47827
+ }
47828
+ findMains(graph, prog) {
47829
+ var _a;
47830
+ const ret = new Set();
47831
+ const filename = (_a = prog.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getFilename();
47832
+ for (const mainFilename of graph.listMainForInclude(filename)) {
47833
+ const file = this.reg.getFileByName(mainFilename);
47834
+ const obj = file ? this.reg.findObjectForFile(file) : undefined;
47835
+ if (obj instanceof _abap_object_1.ABAPObject) {
47836
+ ret.add(obj);
47837
+ }
47838
+ }
47839
+ return ret;
47840
+ }
47841
+ matchesUnknown(prog, macroNames) {
47842
+ for (const file of prog.getABAPFiles()) {
47843
+ for (const s of file.getStatements()) {
47844
+ if (s.get() instanceof _statement_1.Unknown) {
47845
+ const name = expand_macros_1.ExpandMacros.findName(s.getTokens());
47846
+ if (name !== undefined && macroNames.has(name.toUpperCase())) {
47847
+ return true;
47848
+ }
47849
+ }
47850
+ }
47851
+ }
47852
+ return false;
47853
+ }
47854
+ }
47855
+ exports.CrossIncludeMacros = CrossIncludeMacros;
47856
+ //# sourceMappingURL=cross_include_macros.js.map
47857
+
47858
+ /***/ },
47859
+
47725
47860
  /***/ "../core/build/src/abap/nodes/_abstract_node.js"
47726
47861
  /*!******************************************************!*\
47727
47862
  !*** ../core/build/src/abap/nodes/_abstract_node.js ***!
@@ -52562,8 +52697,9 @@ var Mode;
52562
52697
  (function (Mode) {
52563
52698
  Mode[Mode["Default"] = 0] = "Default";
52564
52699
  Mode[Mode["String"] = 1] = "String";
52565
- Mode[Mode["SingleLineComment"] = 2] = "SingleLineComment";
52566
- Mode[Mode["MultiLineComment"] = 3] = "MultiLineComment";
52700
+ Mode[Mode["DoubleQuoteString"] = 2] = "DoubleQuoteString";
52701
+ Mode[Mode["SingleLineComment"] = 3] = "SingleLineComment";
52702
+ Mode[Mode["MultiLineComment"] = 4] = "MultiLineComment";
52567
52703
  })(Mode || (Mode = {}));
52568
52704
  class Result {
52569
52705
  constructor() {
@@ -52623,6 +52759,23 @@ class CDSLexer {
52623
52759
  }
52624
52760
  continue;
52625
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
+ }
52626
52779
  // single line comment handling
52627
52780
  if (mode === Mode.SingleLineComment) {
52628
52781
  if (next === "\n") {
@@ -52669,6 +52822,11 @@ class CDSLexer {
52669
52822
  mode = Mode.String;
52670
52823
  build += next;
52671
52824
  break;
52825
+ case "\"":
52826
+ build = result.add(build, row, col, mode);
52827
+ mode = Mode.DoubleQuoteString;
52828
+ build += next;
52829
+ break;
52672
52830
  case " ":
52673
52831
  case "\t":
52674
52832
  build = result.add(build, row, col, mode);
@@ -53083,7 +53241,9 @@ class CDSAs extends combi_1.Expression {
53083
53241
  getRunnable() {
53084
53242
  const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
53085
53243
  const colonType = (0, combi_1.seq)(":", (0, combi_1.altPrio)(_1.CDSType, _1.CDSName, "LOCALIZED"));
53086
- 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)));
53087
53247
  }
53088
53248
  }
53089
53249
  exports.CDSAs = CDSAs;
@@ -53117,8 +53277,9 @@ class CDSAssociation extends combi_1.Expression {
53117
53277
  // Numeric OF form: "association of [0..1] to Target on ..."
53118
53278
  const ofNumericForm = (0, combi_1.seq)("ASSOCIATION", "OF", numericCardinality, "TO", _1.CDSRelation, "ON", _1.CDSCondition);
53119
53279
  // "association [0..1] to Target as _Alias on condition" — standard form
53280
+ const parentForm = (0, combi_1.seq)("ASSOCIATION", "TO", "PARENT", _1.CDSRelation);
53120
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)));
53121
- return (0, combi_1.altPrio)(ofTextForm, ofNumericForm, standardForm);
53282
+ return (0, combi_1.altPrio)(ofTextForm, ofNumericForm, standardForm, parentForm);
53122
53283
  }
53123
53284
  }
53124
53285
  exports.CDSAssociation = CDSAssociation;
@@ -53375,11 +53536,9 @@ class CDSDefineHierarchy extends combi_1.Expression {
53375
53536
  const directory = (0, combi_1.seq)("DIRECTORY", _1.CDSName, "FILTER", "BY", _1.CDSCondition);
53376
53537
  // DATE PERIOD: period from <field> to <field> [valid from :p to :p]
53377
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)));
53378
- // DEPTH accepts an integer literal or a parameter reference (:param)
53379
- const depthValue = (0, combi_1.altPrio)(_1.CDSInteger, _1.CDSPrefixedName);
53380
- // LOAD mode: BULK, INCREMENTAL, or a parameter reference ($parameters.p_load)
53539
+ const depthValue = (0, combi_1.altPrio)(_1.CDSString, _1.CDSInteger, _1.CDSPrefixedName);
53381
53540
  const loadMode = (0, combi_1.altPrio)("BULK", "INCREMENTAL", _1.CDSPrefixedName);
53382
- 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"))));
53383
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)(";"));
53384
53543
  }
53385
53544
  }
@@ -53427,10 +53586,10 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index
53427
53586
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
53428
53587
  class CDSDefineTableEntity extends combi_1.Expression {
53429
53588
  getRunnable() {
53430
- const nullability = (0, combi_1.optPrio)((0, combi_1.alt)("NOT NULL", "NULL"));
53431
- 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, ";");
53432
- const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53433
- 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);
53434
53593
  const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
53435
53594
  const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
53436
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));
@@ -53485,8 +53644,10 @@ const cds_with_parameters_1 = __webpack_require__(/*! ./cds_with_parameters */ "
53485
53644
  class CDSDefineView extends combi_1.Expression {
53486
53645
  getRunnable() {
53487
53646
  const columnAlias = (0, combi_1.seq)("(", cds_name_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(",", cds_name_1.CDSName)), ")");
53488
- 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
53489
- (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)(";"));
53490
53651
  }
53491
53652
  }
53492
53653
  exports.CDSDefineView = CDSDefineView;
@@ -53513,9 +53674,13 @@ class CDSElement extends combi_1.Expression {
53513
53674
  const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
53514
53675
  const colonThing = (0, combi_1.seq)(":", (0, combi_1.altPrio)(_1.CDSType, _1.CDSName, "LOCALIZED"));
53515
53676
  const extensionWildcard = (0, combi_1.seq)("$extension", ".", "*");
53516
- 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"));
53517
53680
  const typedVirtual = (0, combi_1.seq)("VIRTUAL", _1.CDSName, ":", _1.CDSType);
53518
- 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);
53519
53684
  const elementBody = (0, combi_1.altPrio)(typedVirtual, (0, combi_1.seq)((0, combi_1.altPrio)("KEY", "VIRTUAL"), body), body);
53520
53685
  return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), elementBody, (0, combi_1.optPrio)(cds_as_1.CDSAs));
53521
53686
  }
@@ -53542,7 +53707,9 @@ class CDSExtendView extends combi_1.Expression {
53542
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));
53543
53708
  const valueNested = (0, combi_1.seq)("{", namedot, (0, combi_1.star)((0, combi_1.seq)(",", namedot)), "}");
53544
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);
53545
- 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)(";"));
53546
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, ";");
53547
53714
  const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
53548
53715
  const entityBody = (0, combi_1.seq)("{", (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp)), "}");
@@ -53832,7 +53999,9 @@ class CDSParametersSelect extends combi_1.Expression {
53832
53999
  getRunnable() {
53833
54000
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
53834
54001
  const value = (0, combi_1.alt)(_1.CDSInteger, name, _1.CDSString);
53835
- 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);
53836
54005
  return (0, combi_1.seq)("(", nameValue, (0, combi_1.star)((0, combi_1.seq)(",", nameValue)), ")");
53837
54006
  }
53838
54007
  }
@@ -53866,13 +54035,13 @@ class CDSPrefixedName extends combi_1.Expression {
53866
54035
  const cardinalityJoin = (0, combi_1.seq)("[", cardSpec, ":", joinType, "]");
53867
54036
  const cardinalityJoinWhere = (0, combi_1.seq)("[", cardSpec, ":", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
53868
54037
  const joinWhere = (0, combi_1.seq)("[", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
53869
- 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");
53870
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))), "]");
53871
54040
  const cardNum = (0, combi_1.altPrio)(cds_integer_1.CDSInteger, "*");
53872
54041
  const rangeCard = (0, combi_1.seq)(cds_integer_1.CDSInteger, ".", ".", cardNum);
53873
54042
  const rangeCardFilter = (0, combi_1.seq)("[", rangeCard, ":", cds_condition_1.CDSCondition, "]");
53874
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, "]"));
53875
- 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));
53876
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));
53877
54046
  }
53878
54047
  }
@@ -53917,7 +54086,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../cor
53917
54086
  class CDSRelation extends combi_1.Expression {
53918
54087
  getRunnable() {
53919
54088
  const pre = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w_]+$/), "/");
53920
- 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));
53921
54090
  }
53922
54091
  }
53923
54092
  exports.CDSRelation = CDSRelation;
@@ -53945,11 +54114,12 @@ class CDSSelect extends combi_1.Expression {
53945
54114
  const distinct = (0, combi_1.str)("DISTINCT");
53946
54115
  const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
53947
54116
  const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
53948
- const aspectBinding = (0, combi_1.seq)(_1.CDSPrefixedName, "=", ">", _1.CDSPrefixedName);
53949
- 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)));
53950
54120
  const parenSelect = (0, combi_1.seq)("(", CDSSelect, ")");
53951
54121
  const unionBranch = (0, combi_1.altPrio)(parenSelect, CDSSelect);
53952
- 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))));
53953
54123
  }
53954
54124
  }
53955
54125
  exports.CDSSelect = CDSSelect;
@@ -53972,10 +54142,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../cor
53972
54142
  class CDSSource extends combi_1.Expression {
53973
54143
  getRunnable() {
53974
54144
  const staticFilter = (0, combi_1.seq)("[", _1.CDSCondition, "]");
53975
- // Dotted path: T._Assoc association path as FROM source
53976
- const dottedName = (0, combi_1.seq)(_1.CDSName, ".", _1.CDSName);
53977
- const namedSource = (0, combi_1.altPrio)(dottedName, _1.CDSName);
53978
- 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)));
53979
54146
  const funcSingleSource = (0, combi_1.seq)(_1.CDSFunction, (0, combi_1.opt)((0, combi_1.altPrio)(_1.CDSAs, _1.CDSName)));
53980
54147
  const parenSource = (0, combi_1.seq)("(", (0, combi_1.altPrio)(CDSSource, singleSource), (0, combi_1.star)(_1.CDSJoin), ")");
53981
54148
  return (0, combi_1.altPrio)(parenSource, funcSingleSource, singleSource);
@@ -53999,8 +54166,8 @@ exports.CDSString = void 0;
53999
54166
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
54000
54167
  class CDSString extends combi_1.Expression {
54001
54168
  getRunnable() {
54002
- const reg = (0, combi_1.regex)(/^'(?:[^'\\]|''|\\'|\\\\|\\(?!'))*'$/);
54003
- 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);
54004
54171
  const abap = (0, combi_1.seq)("abap", ".", abapTypeName, (0, combi_1.optPrio)((0, combi_1.seq)("(", (0, combi_1.regex)(/^\d+$/), ")")), reg);
54005
54172
  return (0, combi_1.altPrio)(abap, reg);
54006
54173
  }
@@ -54010,6 +54177,35 @@ exports.CDSString = CDSString;
54010
54177
 
54011
54178
  /***/ },
54012
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
+
54013
54209
  /***/ "../core/build/src/cds/expressions/cds_type.js"
54014
54210
  /*!*****************************************************!*\
54015
54211
  !*** ../core/build/src/cds/expressions/cds_type.js ***!
@@ -54141,6 +54337,7 @@ __exportStar(__webpack_require__(/*! ./cds_relation */ "../core/build/src/cds/ex
54141
54337
  __exportStar(__webpack_require__(/*! ./cds_select */ "../core/build/src/cds/expressions/cds_select.js"), exports);
54142
54338
  __exportStar(__webpack_require__(/*! ./cds_source */ "../core/build/src/cds/expressions/cds_source.js"), exports);
54143
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);
54144
54341
  __exportStar(__webpack_require__(/*! ./cds_type */ "../core/build/src/cds/expressions/cds_type.js"), exports);
54145
54342
  __exportStar(__webpack_require__(/*! ./cds_where */ "../core/build/src/cds/expressions/cds_where.js"), exports);
54146
54343
  __exportStar(__webpack_require__(/*! ./cds_with_parameters */ "../core/build/src/cds/expressions/cds_with_parameters.js"), exports);
@@ -68404,6 +68601,7 @@ const ddic_references_1 = __webpack_require__(/*! ./ddic_references */ "../core/
68404
68601
  const rules_runner_1 = __webpack_require__(/*! ./rules_runner */ "../core/build/src/rules_runner.js");
68405
68602
  const msag_references_1 = __webpack_require__(/*! ./msag_references */ "../core/build/src/msag_references.js");
68406
68603
  const macro_references_1 = __webpack_require__(/*! ./macro_references */ "../core/build/src/macro_references.js");
68604
+ const cross_include_macros_1 = __webpack_require__(/*! ./abap/cross_include_macros */ "../core/build/src/abap/cross_include_macros.js");
68407
68605
  // todo, this should really be an instance in case there are multiple Registry'ies
68408
68606
  class ParsingPerformance {
68409
68607
  static clear() {
@@ -68469,7 +68667,7 @@ class Registry {
68469
68667
  }
68470
68668
  static abaplintVersion() {
68471
68669
  // magic, see build script "version.js"
68472
- return "2.119.55";
68670
+ return "2.119.57";
68473
68671
  }
68474
68672
  getDDICReferences() {
68475
68673
  return this.ddicReferences;
@@ -68693,6 +68891,7 @@ class Registry {
68693
68891
  for (const o of this.getObjects()) {
68694
68892
  this.parsePrivate(o);
68695
68893
  }
68894
+ new cross_include_macros_1.CrossIncludeMacros(this).run();
68696
68895
  new find_global_definitions_1.FindGlobalDefinitions(this).run();
68697
68896
  return this;
68698
68897
  }
@@ -68710,6 +68909,7 @@ class Registry {
68710
68909
  if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {
68711
68910
  ParsingPerformance.output();
68712
68911
  }
68912
+ new cross_include_macros_1.CrossIncludeMacros(this).run();
68713
68913
  new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);
68714
68914
  return this;
68715
68915
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.55",
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.55",
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",