@abaplint/cli 2.120.3 → 2.120.4
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.
- package/build/cli.js +142 -69
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -34038,7 +34038,7 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "../core/build
|
|
|
34038
34038
|
*/
|
|
34039
34039
|
// TODO: refactor all these method parameters to objects, this is getting messy
|
|
34040
34040
|
class Source {
|
|
34041
|
-
static runSyntax(node, input, targetType, writeReference = false, allowGenericDeference = false) {
|
|
34041
|
+
static runSyntax(node, input, targetType, writeReference = false, allowGenericDeference = false, readReference = true) {
|
|
34042
34042
|
var _a;
|
|
34043
34043
|
if (node === undefined) {
|
|
34044
34044
|
return undefined;
|
|
@@ -34216,7 +34216,10 @@ class Source {
|
|
|
34216
34216
|
return undefined;
|
|
34217
34217
|
}
|
|
34218
34218
|
let context = new unknown_type_1.UnknownType("todo, Source type");
|
|
34219
|
-
const type = [
|
|
34219
|
+
const type = [];
|
|
34220
|
+
if (readReference) {
|
|
34221
|
+
type.push(_reference_1.ReferenceType.DataReadReference);
|
|
34222
|
+
}
|
|
34220
34223
|
if (writeReference) {
|
|
34221
34224
|
type.push(_reference_1.ReferenceType.DataWriteReference);
|
|
34222
34225
|
}
|
|
@@ -37152,7 +37155,8 @@ class CallTransformation {
|
|
|
37152
37155
|
const resultParameters = node.findExpressionAfterToken("RESULT");
|
|
37153
37156
|
const resultSources = new Set((resultParameters === null || resultParameters === void 0 ? void 0 : resultParameters.findAllExpressions(Expressions.SimpleSource3)) || []);
|
|
37154
37157
|
for (const s of node.findAllExpressions(Expressions.SimpleSource3)) {
|
|
37155
|
-
|
|
37158
|
+
const isResult = resultSources.has(s);
|
|
37159
|
+
source_1.Source.runSyntax(s, input, undefined, isResult, false, isResult === false);
|
|
37156
37160
|
}
|
|
37157
37161
|
for (const d of node.findAllExpressions(Expressions.Dynamic)) {
|
|
37158
37162
|
dynamic_1.Dynamic.runSyntax(d, input);
|
|
@@ -37334,7 +37338,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
37334
37338
|
exports.Catch = void 0;
|
|
37335
37339
|
const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "../core/build/src/abap/2_statements/expressions/index.js"));
|
|
37336
37340
|
const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "../core/build/src/abap/types/_typed_identifier.js");
|
|
37337
|
-
const unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ "../core/build/src/abap/types/basic/unknown_type.js");
|
|
37338
37341
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "../core/build/src/abap/types/basic/index.js");
|
|
37339
37342
|
const target_1 = __webpack_require__(/*! ../expressions/target */ "../core/build/src/abap/5_syntax/expressions/target.js");
|
|
37340
37343
|
const _reference_1 = __webpack_require__(/*! ../_reference */ "../core/build/src/abap/5_syntax/_reference.js");
|
|
@@ -37342,7 +37345,7 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/bui
|
|
|
37342
37345
|
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "../core/build/src/abap/5_syntax/_type_utils.js");
|
|
37343
37346
|
class Catch {
|
|
37344
37347
|
runSyntax(node, input) {
|
|
37345
|
-
var _a
|
|
37348
|
+
var _a;
|
|
37346
37349
|
const names = new Set();
|
|
37347
37350
|
for (const c of node.findDirectExpressions(Expressions.ClassName)) {
|
|
37348
37351
|
const token = c.getFirstToken();
|
|
@@ -37358,7 +37361,6 @@ class Catch {
|
|
|
37358
37361
|
else {
|
|
37359
37362
|
const message = "CATCH, unknown class " + className;
|
|
37360
37363
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, token, message));
|
|
37361
|
-
return;
|
|
37362
37364
|
}
|
|
37363
37365
|
if (names.has(className)) {
|
|
37364
37366
|
const message = "Duplicate class name in CATCH: " + className;
|
|
@@ -37368,23 +37370,18 @@ class Catch {
|
|
|
37368
37370
|
names.add(className);
|
|
37369
37371
|
}
|
|
37370
37372
|
const target = node.findDirectExpression(Expressions.Target);
|
|
37371
|
-
const firstClassName = (_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();
|
|
37372
37373
|
if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {
|
|
37373
|
-
const token = (
|
|
37374
|
-
|
|
37375
|
-
|
|
37376
|
-
const
|
|
37377
|
-
|
|
37378
|
-
|
|
37379
|
-
|
|
37380
|
-
|
|
37381
|
-
|
|
37382
|
-
|
|
37383
|
-
|
|
37384
|
-
}
|
|
37385
|
-
else if (token) {
|
|
37386
|
-
const message = "Catch, could not determine type for \"" + token.getStr() + "\"";
|
|
37387
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, input.filename, new unknown_type_1.UnknownType(message), ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
37374
|
+
const token = (_a = target.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
37375
|
+
if (token) {
|
|
37376
|
+
const classNames = Array.from(names);
|
|
37377
|
+
const unknownClass = classNames.find(name => input.scope.findClassDefinition(name) === undefined);
|
|
37378
|
+
const commonSuperclass = unknownClass === undefined
|
|
37379
|
+
? this.findCommonSuperclass(classNames, input)
|
|
37380
|
+
: undefined;
|
|
37381
|
+
const type = commonSuperclass
|
|
37382
|
+
? new basic_1.ObjectReferenceType(commonSuperclass)
|
|
37383
|
+
: basic_1.VoidType.get(unknownClass || classNames.join(" "));
|
|
37384
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, input.filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
37388
37385
|
input.scope.addIdentifier(identifier);
|
|
37389
37386
|
input.scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, input.filename);
|
|
37390
37387
|
}
|
|
@@ -37408,6 +37405,22 @@ class Catch {
|
|
|
37408
37405
|
}
|
|
37409
37406
|
}
|
|
37410
37407
|
}
|
|
37408
|
+
findCommonSuperclass(classNames, input) {
|
|
37409
|
+
var _a;
|
|
37410
|
+
const lineages = [];
|
|
37411
|
+
for (const className of classNames) {
|
|
37412
|
+
const lineage = [];
|
|
37413
|
+
let current = input.scope.findClassDefinition(className);
|
|
37414
|
+
const visited = new Set();
|
|
37415
|
+
while (current && visited.has(current.getName().toUpperCase()) === false) {
|
|
37416
|
+
lineage.push(current);
|
|
37417
|
+
visited.add(current.getName().toUpperCase());
|
|
37418
|
+
current = input.scope.findClassDefinition(current.getSuperClass());
|
|
37419
|
+
}
|
|
37420
|
+
lineages.push(lineage);
|
|
37421
|
+
}
|
|
37422
|
+
return (_a = lineages[0]) === null || _a === void 0 ? void 0 : _a.find(candidate => lineages.every(lineage => lineage.some(item => item.getName().toUpperCase() === candidate.getName().toUpperCase())));
|
|
37423
|
+
}
|
|
37411
37424
|
}
|
|
37412
37425
|
exports.Catch = Catch;
|
|
37413
37426
|
//# sourceMappingURL=catch.js.map
|
|
@@ -53276,7 +53289,7 @@ class CDSAggregate extends combi_1.Expression {
|
|
|
53276
53289
|
getRunnable() {
|
|
53277
53290
|
const fieldAsType = (0, combi_1.seq)(_1.CDSPrefixedName, "AS", _1.CDSType);
|
|
53278
53291
|
const funcAsType = (0, combi_1.seq)(_1.CDSFunction, "AS", _1.CDSType);
|
|
53279
|
-
const value = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSCast, _1.CDSCase, funcAsType, _1.CDSFunction, fieldAsType, _1.CDSPrefixedName, _1.CDSString, "*");
|
|
53292
|
+
const value = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSArithParen, _1.CDSCast, _1.CDSCase, funcAsType, _1.CDSFunction, fieldAsType, _1.CDSPrefixedName, _1.CDSString, "*");
|
|
53280
53293
|
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)), ")");
|
|
53281
53294
|
}
|
|
53282
53295
|
}
|
|
@@ -53401,9 +53414,10 @@ class CDSAnnotationSimple extends combi_1.Expression {
|
|
|
53401
53414
|
getRunnable() {
|
|
53402
53415
|
const ident = (0, combi_1.regex)(/^[\w_]+$/);
|
|
53403
53416
|
// #(expr) where expr can be: identifier, dotted path, string, or concatenation with +
|
|
53404
|
-
const
|
|
53417
|
+
const funcCall = (0, combi_1.seq)(ident, "(", (0, combi_1.altPrio)(_1.CDSString, cds_prefixed_name_1.CDSPrefixedName, ident), ")");
|
|
53418
|
+
const hashArg = (0, combi_1.altPrio)(_1.CDSString, funcCall, cds_prefixed_name_1.CDSPrefixedName, ident);
|
|
53405
53419
|
const hashExpr = (0, combi_1.seq)(hashArg, (0, combi_1.starPrio)((0, combi_1.seq)("+", hashArg)));
|
|
53406
|
-
const value = (0, combi_1.altPrio)(_1.CDSString, "true", "false", "null", (0, combi_1.seq)("-", (0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)("-", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)((0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.regex)(/^\d+$/), (0, combi_1.seq)("#", "(", hashExpr, ")"), (0, combi_1.regex)(/^#[\w_]+$/));
|
|
53420
|
+
const value = (0, combi_1.altPrio)(_1.CDSString, "true", "false", "null", (0, combi_1.seq)("-", (0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+[eE]$/), (0, combi_1.altPrio)("+", "-"), (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)((0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+[eE]$/), (0, combi_1.altPrio)("+", "-"), (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)("-", (0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)("-", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)((0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.regex)(/^\d+$/), (0, combi_1.seq)("#", "(", hashExpr, ")"), (0, combi_1.regex)(/^#[\w_]+$/));
|
|
53407
53421
|
return value;
|
|
53408
53422
|
}
|
|
53409
53423
|
}
|
|
@@ -53561,9 +53575,9 @@ class CDSAssociation extends combi_1.Expression {
|
|
|
53561
53575
|
const numericCardinality = (0, combi_1.seq)("[", cardNum, (0, combi_1.optPrio)((0, combi_1.seq)(".", ".", cardNum)), "]");
|
|
53562
53576
|
// Text-based OF form: "association of one to many Target on ..." — text cardinality includes "TO"
|
|
53563
53577
|
const ofTextSide = (0, combi_1.altPrio)((0, combi_1.seq)("EXACT", "ONE"), "ONE", "MANY");
|
|
53564
|
-
const ofTextForm = (0, combi_1.seq)("ASSOCIATION", "OF", ofTextSide, "TO", ofTextSide, _1.CDSRelation, "ON", _1.CDSCondition);
|
|
53578
|
+
const ofTextForm = (0, combi_1.seq)("ASSOCIATION", "OF", ofTextSide, "TO", ofTextSide, _1.CDSRelation, "ON", _1.CDSCondition, (0, combi_1.opt)((0, combi_1.seq)("WITH", "DEFAULT", "FILTER", _1.CDSCondition)));
|
|
53565
53579
|
// Numeric OF form: "association of [0..1] to Target on ..."
|
|
53566
|
-
const ofNumericForm = (0, combi_1.seq)("ASSOCIATION", "OF", numericCardinality, "TO", _1.CDSRelation, "ON", _1.CDSCondition);
|
|
53580
|
+
const ofNumericForm = (0, combi_1.seq)("ASSOCIATION", "OF", numericCardinality, "TO", _1.CDSRelation, "ON", _1.CDSCondition, (0, combi_1.opt)((0, combi_1.seq)("WITH", "DEFAULT", "FILTER", _1.CDSCondition)));
|
|
53567
53581
|
// "association [0..1] to Target as _Alias on condition" — standard form
|
|
53568
53582
|
const parentForm = (0, combi_1.seq)("ASSOCIATION", "TO", "PARENT", _1.CDSRelation);
|
|
53569
53583
|
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)));
|
|
@@ -53621,7 +53635,7 @@ class CDSCase extends combi_1.Expression {
|
|
|
53621
53635
|
// CDSArithmetics is still tried after for arithmetic like (-1)*Amount or (2*A)-B.
|
|
53622
53636
|
const caseParen = (0, combi_1.seq)("(", CDSCase, ")");
|
|
53623
53637
|
const value = (0, combi_1.altPrio)(_1.CDSString, CDSCase, caseParen, _1.CDSArithmetics, _1.CDSCast, _1.CDSAggregate, _1.CDSArithParen, _1.CDSFunction, _1.CDSInteger, _1.CDSPrefixedName);
|
|
53624
|
-
const simple = (0, combi_1.seq)((0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSArithParen, _1.CDSAggregate, _1.CDSFunction, _1.CDSPrefixedName), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)));
|
|
53638
|
+
const simple = (0, combi_1.seq)((0, combi_1.altPrio)(_1.CDSString, _1.CDSCast, _1.CDSArithmetics, _1.CDSArithParen, _1.CDSAggregate, _1.CDSFunction, _1.CDSPrefixedName), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)));
|
|
53625
53639
|
const complex = (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value));
|
|
53626
53640
|
return (0, combi_1.seq)("CASE", (0, combi_1.altPrio)(complex, simple), (0, combi_1.optPrio)((0, combi_1.seq)("ELSE", value)), "END");
|
|
53627
53641
|
}
|
|
@@ -53646,7 +53660,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../cor
|
|
|
53646
53660
|
class CDSCast extends combi_1.Expression {
|
|
53647
53661
|
getRunnable() {
|
|
53648
53662
|
// CDSArithmetics before CDSFunction/CDSAggregate: handles function()*n, cast()*n, sum()*n patterns
|
|
53649
|
-
const first = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSFunction, _1.CDSArithParen, _1.CDSCase, _1.CDSAggregate, CDSCast, _1.
|
|
53663
|
+
const first = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSFunction, _1.CDSArithParen, _1.CDSCase, _1.CDSAggregate, CDSCast, _1.CDSInteger, _1.CDSString, _1.CDSPrefixedName);
|
|
53650
53664
|
return (0, combi_1.seq)("CAST", "(", first, "AS", _1.CDSType, (0, combi_1.optPrio)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
|
|
53651
53665
|
}
|
|
53652
53666
|
}
|
|
@@ -53671,8 +53685,9 @@ const cds_cardinality_1 = __webpack_require__(/*! ./cds_cardinality */ "../core/
|
|
|
53671
53685
|
class CDSComposition extends combi_1.Expression {
|
|
53672
53686
|
getRunnable() {
|
|
53673
53687
|
const num = (0, combi_1.altPrio)("ONE", "MANY");
|
|
53674
|
-
|
|
53675
|
-
|
|
53688
|
+
const exactNum = (0, combi_1.seq)((0, combi_1.opt)("EXACT"), num);
|
|
53689
|
+
// Text cardinality after OF: "of exact one to exact one", "of exact one to many", "of one to many", or bare "of many" / "of one"
|
|
53690
|
+
const textCardinality = (0, combi_1.altPrio)((0, combi_1.seq)(exactNum, "TO", exactNum), (0, combi_1.seq)((0, combi_1.opt)("EXACT"), num));
|
|
53676
53691
|
// Numeric cardinality [n..m] before OF: any non-negative integer or *
|
|
53677
53692
|
const cardNum = (0, combi_1.altPrio)((0, combi_1.regex)(/^\d+$/), "*");
|
|
53678
53693
|
const numericCardinality = (0, combi_1.seq)("[", cardNum, (0, combi_1.optPrio)((0, combi_1.seq)(".", ".", cardNum)), "]");
|
|
@@ -53701,7 +53716,7 @@ class CDSCondition extends combi_1.Expression {
|
|
|
53701
53716
|
getRunnable() {
|
|
53702
53717
|
// CDSArithmetics before CDSCast/CDSFunction so cast(A)-cast(B) is handled as arithmetic, not two separate casts
|
|
53703
53718
|
// CDSCase allows nested case expressions on either side of a comparison
|
|
53704
|
-
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSArithmetics, _1.CDSCast, _1.CDSFunction, _1.CDSAggregate, _1.CDSCase, _1.CDSArithParen, _1.CDSPrefixedName);
|
|
53719
|
+
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSArithmetics, _1.CDSCast, _1.CDSFunction, _1.CDSAggregate, _1.CDSCase, _1.CDSArithParen, cds_integer_1.CDSInteger, _1.CDSPrefixedName);
|
|
53705
53720
|
const nonLikeOperators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">");
|
|
53706
53721
|
const likeOperators = (0, combi_1.altPrio)("LIKE", "NOT LIKE");
|
|
53707
53722
|
// Right side of comparison: simple values first, then parenthesized, then full arithmetic last.
|
|
@@ -53765,7 +53780,7 @@ class CDSDefineCustom extends combi_1.Expression {
|
|
|
53765
53780
|
getRunnable() {
|
|
53766
53781
|
const field = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", cds_type_1.CDSType, ";");
|
|
53767
53782
|
const compsiOrAssoci = (0, combi_1.seq)(cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
|
|
53768
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
53783
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)((0, combi_1.str)("DEFINE")), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.opt)(_1.CDSWithParameters), (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
53769
53784
|
}
|
|
53770
53785
|
}
|
|
53771
53786
|
exports.CDSDefineCustom = CDSDefineCustom;
|
|
@@ -53787,7 +53802,7 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index
|
|
|
53787
53802
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
53788
53803
|
class CDSDefineExternalEntity extends combi_1.Expression {
|
|
53789
53804
|
getRunnable() {
|
|
53790
|
-
const extNameValue = (0, combi_1.alt)(_1.CDSName, (0, combi_1.regex)(/^"[^"]*"$/));
|
|
53805
|
+
const extNameValue = (0, combi_1.alt)(_1.CDSName, (0, combi_1.regex)(/^"(?:[^"]|"")*"$/));
|
|
53791
53806
|
const externalName = (0, combi_1.seq)("EXTERNAL", "NAME", extNameValue);
|
|
53792
53807
|
const nullability = (0, combi_1.optPrio)((0, combi_1.alt)("NOT NULL", "NULL"));
|
|
53793
53808
|
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), ";");
|
|
@@ -53795,7 +53810,7 @@ class CDSDefineExternalEntity extends combi_1.Expression {
|
|
|
53795
53810
|
const body = (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp));
|
|
53796
53811
|
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));
|
|
53797
53812
|
const staticEntity = (0, combi_1.seq)("STATIC", "ENTITY", _1.CDSName, (0, combi_1.opt)(externalName));
|
|
53798
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("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)(";"));
|
|
53813
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("ROOT"), (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.optPrio)((0, combi_1.seq)("ON", "UNLINKED", (0, combi_1.altPrio)("FAIL", "IGNORE"))))), (0, combi_1.opt)(";"));
|
|
53799
53814
|
}
|
|
53800
53815
|
}
|
|
53801
53816
|
exports.CDSDefineExternalEntity = CDSDefineExternalEntity;
|
|
@@ -53823,10 +53838,10 @@ class CDSDefineHierarchy extends combi_1.Expression {
|
|
|
53823
53838
|
const siblingsOrder = (0, combi_1.seq)("SIBLINGS", "ORDER", "BY", siblingsOrderField, (0, combi_1.star)((0, combi_1.seq)(",", siblingsOrderField)));
|
|
53824
53839
|
const directory = (0, combi_1.seq)("DIRECTORY", _1.CDSName, "FILTER", "BY", _1.CDSCondition);
|
|
53825
53840
|
// DATE PERIOD: period from <field> to <field> [valid from :p to :p]
|
|
53826
|
-
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)));
|
|
53841
|
+
const datePeriod = (0, combi_1.seq)("PERIOD", "FROM", _1.CDSName, "TO", _1.CDSName, (0, combi_1.opt)((0, combi_1.seq)("VALID", "FROM", (0, combi_1.altPrio)(_1.CDSString, _1.CDSPrefixedName), "TO", (0, combi_1.altPrio)(_1.CDSString, _1.CDSPrefixedName))));
|
|
53827
53842
|
const depthValue = (0, combi_1.altPrio)(_1.CDSString, _1.CDSInteger, _1.CDSPrefixedName);
|
|
53828
53843
|
const loadMode = (0, combi_1.altPrio)("BULK", "INCREMENTAL", _1.CDSPrefixedName);
|
|
53829
|
-
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)("
|
|
53844
|
+
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)((0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.opt)(directory), datePeriod, (0, combi_1.opt)(directory)), (0, combi_1.seq)(datePeriod, (0, combi_1.opt)(directory)), 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)("DEPTH", depthValue)), (0, combi_1.opt)((0, combi_1.seq)("NODETYPE", _1.CDSName)), (0, combi_1.opt)((0, combi_1.seq)("LOAD", loadMode)), (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"))));
|
|
53830
53845
|
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("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)(";"));
|
|
53831
53846
|
}
|
|
53832
53847
|
}
|
|
@@ -53850,9 +53865,14 @@ const __1 = __webpack_require__(/*! ../.. */ "../core/build/src/index.js");
|
|
|
53850
53865
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
53851
53866
|
class CDSDefineProjection extends combi_1.Expression {
|
|
53852
53867
|
getRunnable() {
|
|
53853
|
-
|
|
53854
|
-
const
|
|
53855
|
-
|
|
53868
|
+
const redefineCard = (0, combi_1.altPrio)("EXACT ONE TO EXACT ONE", "EXACT ONE TO MANY", "EXACT ONE TO ONE", "MANY TO EXACT ONE", "MANY TO MANY", "MANY TO ONE", "ONE TO EXACT ONE", "ONE TO MANY", "ONE TO ONE", "TO EXACT ONE", "TO ONE", "TO MANY", _1.CDSInteger, "*");
|
|
53869
|
+
const redefineAssocFilter = (0, combi_1.seq)("[", (0, combi_1.optPrio)((0, combi_1.seq)(redefineCard, ":")), _1.CDSCondition, "]");
|
|
53870
|
+
const redefineAssoc = (0, combi_1.seq)("REDEFINE", "ASSOCIATION", _1.CDSPrefixedName, (0, combi_1.optPrio)(redefineAssocFilter), (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);
|
|
53871
|
+
const typedLiteralVal = (0, combi_1.seq)(_1.CDSType, _1.CDSString);
|
|
53872
|
+
const aspectValue = (0, combi_1.altPrio)(typedLiteralVal, _1.CDSString, _1.CDSPrefixedName);
|
|
53873
|
+
const aspectBinding = (0, combi_1.seq)(_1.CDSPrefixedName, "=", ">", aspectValue);
|
|
53874
|
+
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)));
|
|
53875
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)("DEFINE"), (0, combi_1.opt)("TRANSIENT"), (0, combi_1.opt)("ROOT"), "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.starPrio)(bindAspect), (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)(";"));
|
|
53856
53876
|
}
|
|
53857
53877
|
}
|
|
53858
53878
|
exports.CDSDefineProjection = CDSDefineProjection;
|
|
@@ -53932,9 +53952,9 @@ const cds_with_parameters_1 = __webpack_require__(/*! ./cds_with_parameters */ "
|
|
|
53932
53952
|
class CDSDefineView extends combi_1.Expression {
|
|
53933
53953
|
getRunnable() {
|
|
53934
53954
|
const columnAlias = (0, combi_1.seq)("(", cds_name_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(",", cds_name_1.CDSName)), ")");
|
|
53935
|
-
const
|
|
53936
|
-
const
|
|
53937
|
-
const topLevelSelect = (0, combi_1.altPrio)((0, combi_1.seq)(
|
|
53955
|
+
const unionBranch = (0, combi_1.altPrio)(_1.CDSParenSelect, cds_select_1.CDSSelect);
|
|
53956
|
+
const unionOps = (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)));
|
|
53957
|
+
const topLevelSelect = (0, combi_1.altPrio)((0, combi_1.seq)(_1.CDSParenSelect, unionOps), (0, combi_1.seq)(cds_select_1.CDSSelect, unionOps));
|
|
53938
53958
|
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)(";"));
|
|
53939
53959
|
}
|
|
53940
53960
|
}
|
|
@@ -53959,16 +53979,16 @@ const cds_as_1 = __webpack_require__(/*! ./cds_as */ "../core/build/src/cds/expr
|
|
|
53959
53979
|
const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "../core/build/src/cds/expressions/cds_cast.js");
|
|
53960
53980
|
class CDSElement extends combi_1.Expression {
|
|
53961
53981
|
getRunnable() {
|
|
53962
|
-
const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName);
|
|
53982
|
+
const redirected = (0, combi_1.seq)(": REDIRECTED TO", (0, combi_1.optPrio)((0, combi_1.altPrio)("PARENT", "COMPOSITION CHILD")), _1.CDSName, (0, combi_1.optPrio)(_1.CDSParametersSelect));
|
|
53963
53983
|
const colonThing = (0, combi_1.seq)(":", (0, combi_1.altPrio)(_1.CDSType, _1.CDSName, "LOCALIZED"));
|
|
53964
53984
|
const extensionWildcard = (0, combi_1.seq)("$extension", ".", "*");
|
|
53965
53985
|
const excludingNames = (0, combi_1.seq)(_1.CDSName, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSName)));
|
|
53966
53986
|
const excluding = (0, combi_1.seq)("EXCLUDING", "{", excludingNames, "}");
|
|
53967
|
-
const includeElement = (0, combi_1.seq)("INCLUDE", _1.CDSPrefixedName, (0, combi_1.optPrio)(excluding), (0, combi_1.optPrio)("SIGNATURE ONLY"));
|
|
53987
|
+
const includeElement = (0, combi_1.seq)("INCLUDE", (0, combi_1.stopBefore1)("AS", "KEY", "VIRTUAL", "}"), _1.CDSPrefixedName, (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)("SIGNATURE ONLY", (0, combi_1.optPrio)(excluding)), (0, combi_1.seq)(excluding, (0, combi_1.optPrio)("SIGNATURE ONLY")))));
|
|
53968
53988
|
const typedVirtual = (0, combi_1.seq)("VIRTUAL", _1.CDSName, ":", _1.CDSType);
|
|
53969
53989
|
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)));
|
|
53970
53990
|
const funcWithPath = (0, combi_1.seq)(_1.CDSFunction, (0, combi_1.plusPrio)(pathSegment));
|
|
53971
|
-
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)))
|
|
53991
|
+
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, ")"), _1.CDSInteger, (0, combi_1.seq)(_1.CDSPrefixedName, (0, combi_1.optPrio)(cds_as_1.CDSAs), (0, combi_1.optPrio)((0, combi_1.altPrio)(redirected, colonThing))));
|
|
53972
53992
|
const elementBody = (0, combi_1.altPrio)(typedVirtual, (0, combi_1.seq)((0, combi_1.altPrio)("KEY", "VIRTUAL"), body), body);
|
|
53973
53993
|
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), elementBody, (0, combi_1.optPrio)(cds_as_1.CDSAs), (0, combi_1.starPrio)(_1.CDSAnnotation));
|
|
53974
53994
|
}
|
|
@@ -53994,10 +54014,20 @@ class CDSExtendView extends combi_1.Expression {
|
|
|
53994
54014
|
getRunnable() {
|
|
53995
54015
|
const namedot = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)), (0, combi_1.optPrio)(_1.CDSAs));
|
|
53996
54016
|
const valueNested = (0, combi_1.seq)("{", namedot, (0, combi_1.star)((0, combi_1.seq)(",", namedot)), "}");
|
|
53997
|
-
const
|
|
54017
|
+
const redefineCard = (0, combi_1.altPrio)("EXACT ONE TO EXACT ONE", "EXACT ONE TO MANY", "EXACT ONE TO ONE", "MANY TO EXACT ONE", "MANY TO MANY", "MANY TO ONE", "ONE TO EXACT ONE", "ONE TO MANY", "ONE TO ONE", "TO EXACT ONE", "TO ONE", "TO MANY", _1.CDSInteger, "*");
|
|
54018
|
+
const redefineAssocFilter = (0, combi_1.seq)("[", (0, combi_1.optPrio)((0, combi_1.seq)(redefineCard, ":")), _1.CDSCondition, "]");
|
|
54019
|
+
const redefineAssoc = (0, combi_1.seq)("REDEFINE", "ASSOCIATION", _1.CDSPrefixedName, (0, combi_1.optPrio)(redefineAssocFilter), (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);
|
|
53998
54020
|
const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
|
|
53999
54021
|
const elementNested = (0, combi_1.seq)("{", (0, combi_1.altPrio)("*", elementList), "}");
|
|
54000
|
-
const
|
|
54022
|
+
const unionElemList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
|
|
54023
|
+
const unionBranchBody = (0, combi_1.seq)((0, combi_1.star)((0, combi_1.altPrio)(_1.CDSAssociation, _1.CDSComposition)), "{", (0, combi_1.altPrio)("*", unionElemList), "}", (0, combi_1.optPrio)(_1.CDSGroupBy));
|
|
54024
|
+
const parenUnionBody = (0, combi_1.seq)("(", (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSAssociation, _1.CDSComposition)), "{", (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(",")), "}", (0, combi_1.star)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSAssociation, _1.CDSComposition)), "{", (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(",")), "}")), ")");
|
|
54025
|
+
const unionSuffix = (0, combi_1.seq)((0, combi_1.optPrio)(_1.CDSGroupBy), (0, combi_1.star)((0, combi_1.seq)("UNION", (0, combi_1.opt)("ALL"), (0, combi_1.altPrio)(parenUnionBody, unionBranchBody))));
|
|
54026
|
+
const typedLiteralVal = (0, combi_1.seq)(_1.CDSType, _1.CDSString);
|
|
54027
|
+
const aspectValue = (0, combi_1.altPrio)(typedLiteralVal, _1.CDSString, _1.CDSPrefixedName);
|
|
54028
|
+
const aspectBinding = (0, combi_1.seq)(_1.CDSPrefixedName, "=", ">", aspectValue);
|
|
54029
|
+
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)));
|
|
54030
|
+
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)((0, combi_1.altPrio)(_1.CDSAssociation, _1.CDSComposition)), (0, combi_1.starPrio)(bindAspect), (0, combi_1.altPrio)(parenUnionBody, elementNested, valueNested), unionSuffix, (0, combi_1.opt)(";"));
|
|
54001
54031
|
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, ";");
|
|
54002
54032
|
const assocOrComp = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
|
|
54003
54033
|
const entityBody = (0, combi_1.seq)("{", (0, combi_1.plus)((0, combi_1.alt)(field, assocOrComp)), "}");
|
|
@@ -54077,6 +54107,7 @@ class CDSFunction extends combi_1.Expression {
|
|
|
54077
54107
|
const occurrencesRegexpr = (0, combi_1.seq)("OCCURRENCES_REGEXPR", "(", conversionInputs, ")");
|
|
54078
54108
|
const substrRegexpr = (0, combi_1.seq)("SUBSTR_REGEXPR", "(", conversionInputs, ")");
|
|
54079
54109
|
const locateRegexpr = (0, combi_1.seq)("LOCATE_REGEXPR", "(", conversionInputs, ")");
|
|
54110
|
+
const sqrt = (0, combi_1.seq)("SQRT", "(", _1.CDSFunctionInput, ")");
|
|
54080
54111
|
const extFuncName = (0, combi_1.regex)(/^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+$/i);
|
|
54081
54112
|
const genericArgs = (0, combi_1.seq)(_1.CDSFunctionInput, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSFunctionInput)));
|
|
54082
54113
|
const namedArgValue = (0, combi_1.altPrio)((0, combi_1.seq)("INTERVAL", _1.CDSFunctionInput, _1.CDSName), _1.CDSFunctionInput, _1.CDSName);
|
|
@@ -54084,7 +54115,7 @@ class CDSFunction extends combi_1.Expression {
|
|
|
54084
54115
|
const namedArgColon = (0, combi_1.seq)(_1.CDSName, ":", namedArgValue);
|
|
54085
54116
|
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))));
|
|
54086
54117
|
const genericFunc = (0, combi_1.seq)(extFuncName, "(", (0, combi_1.optPrio)((0, combi_1.altPrio)(namedArgs, genericArgs)), ")");
|
|
54087
|
-
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);
|
|
54118
|
+
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, sqrt, genericFunc);
|
|
54088
54119
|
}
|
|
54089
54120
|
}
|
|
54090
54121
|
exports.CDSFunction = CDSFunction;
|
|
@@ -54106,8 +54137,9 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index
|
|
|
54106
54137
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
54107
54138
|
class CDSFunctionInput extends combi_1.Expression {
|
|
54108
54139
|
getRunnable() {
|
|
54109
|
-
const
|
|
54110
|
-
|
|
54140
|
+
const positional = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSArithParen, _1.CDSAggregate, _1.CDSCast, _1.CDSFunction, _1.CDSCase, _1.CDSString, _1.CDSPrefixedName, _1.CDSInteger);
|
|
54141
|
+
const named = (0, combi_1.seq)(_1.CDSName, "=", ">", positional);
|
|
54142
|
+
return (0, combi_1.altPrio)(named, positional);
|
|
54111
54143
|
}
|
|
54112
54144
|
}
|
|
54113
54145
|
exports.CDSFunctionInput = CDSFunctionInput;
|
|
@@ -54236,10 +54268,14 @@ exports.CDSJoin = CDSJoin;
|
|
|
54236
54268
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
54237
54269
|
exports.CDSName = void 0;
|
|
54238
54270
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
54271
|
+
const KEYWORDS = ["AS", "ON", "WHERE", "WITH", "UNION", "GROUP", "HAVING",
|
|
54272
|
+
"AND", "OR", "BETWEEN", "LIKE", "IN", "EXISTS",
|
|
54273
|
+
"WHEN", "THEN", "ELSE", "END", "CASE", "CAST"];
|
|
54239
54274
|
class CDSName extends combi_1.Expression {
|
|
54240
54275
|
getRunnable() {
|
|
54241
|
-
const
|
|
54242
|
-
|
|
54276
|
+
const word = (0, combi_1.regex)(/^\$?#?[\w_]+$/);
|
|
54277
|
+
const slashName = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w]+$/), "/", (0, combi_1.stopBefore1)(...KEYWORDS), (0, combi_1.regex)(/^[\w_]+$/));
|
|
54278
|
+
return (0, combi_1.altPrio)((0, combi_1.regex)(/^"(?:[^"]|"")*"$/), (0, combi_1.seq)((0, combi_1.optPrio)(":"), slashName), (0, combi_1.seq)((0, combi_1.optPrio)(":"), word));
|
|
54243
54279
|
}
|
|
54244
54280
|
}
|
|
54245
54281
|
exports.CDSName = CDSName;
|
|
@@ -54286,7 +54322,8 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../cor
|
|
|
54286
54322
|
class CDSParametersSelect extends combi_1.Expression {
|
|
54287
54323
|
getRunnable() {
|
|
54288
54324
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
|
|
54289
|
-
const
|
|
54325
|
+
const typedLiteral = (0, combi_1.seq)(_1.CDSType, _1.CDSString);
|
|
54326
|
+
const value = (0, combi_1.altPrio)(typedLiteral, _1.CDSInteger, name, _1.CDSString);
|
|
54290
54327
|
const colonPair = (0, combi_1.seq)(name, ":", value, (0, combi_1.optPrio)("DEFAULT"));
|
|
54291
54328
|
const arrowPair = (0, combi_1.seq)(name, "=", ">", value);
|
|
54292
54329
|
const nameValue = (0, combi_1.altPrio)(colonPair, arrowPair);
|
|
@@ -54298,6 +54335,30 @@ exports.CDSParametersSelect = CDSParametersSelect;
|
|
|
54298
54335
|
|
|
54299
54336
|
/***/ },
|
|
54300
54337
|
|
|
54338
|
+
/***/ "../core/build/src/cds/expressions/cds_paren_select.js"
|
|
54339
|
+
/*!*************************************************************!*\
|
|
54340
|
+
!*** ../core/build/src/cds/expressions/cds_paren_select.js ***!
|
|
54341
|
+
\*************************************************************/
|
|
54342
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
54343
|
+
|
|
54344
|
+
"use strict";
|
|
54345
|
+
|
|
54346
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
54347
|
+
exports.CDSParenSelect = void 0;
|
|
54348
|
+
const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index.js");
|
|
54349
|
+
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
54350
|
+
class CDSParenSelect extends combi_1.Expression {
|
|
54351
|
+
getRunnable() {
|
|
54352
|
+
const unionBranch = (0, combi_1.altPrio)(CDSParenSelect, _1.CDSSelect);
|
|
54353
|
+
const unionOps = (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)));
|
|
54354
|
+
return (0, combi_1.seq)("(", (0, combi_1.altPrio)((0, combi_1.seq)(CDSParenSelect, unionOps), (0, combi_1.seq)(_1.CDSSelect, unionOps)), ")");
|
|
54355
|
+
}
|
|
54356
|
+
}
|
|
54357
|
+
exports.CDSParenSelect = CDSParenSelect;
|
|
54358
|
+
//# sourceMappingURL=cds_paren_select.js.map
|
|
54359
|
+
|
|
54360
|
+
/***/ },
|
|
54361
|
+
|
|
54301
54362
|
/***/ "../core/build/src/cds/expressions/cds_prefixed_name.js"
|
|
54302
54363
|
/*!**************************************************************!*\
|
|
54303
54364
|
!*** ../core/build/src/cds/expressions/cds_prefixed_name.js ***!
|
|
@@ -54310,10 +54371,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
54310
54371
|
exports.CDSPrefixedName = void 0;
|
|
54311
54372
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
54312
54373
|
const cds_name_1 = __webpack_require__(/*! ./cds_name */ "../core/build/src/cds/expressions/cds_name.js");
|
|
54374
|
+
const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "../core/build/src/cds/expressions/cds_integer.js");
|
|
54313
54375
|
const cds_parameters_1 = __webpack_require__(/*! ./cds_parameters */ "../core/build/src/cds/expressions/cds_parameters.js");
|
|
54314
54376
|
const cds_parameters_select_1 = __webpack_require__(/*! ./cds_parameters_select */ "../core/build/src/cds/expressions/cds_parameters_select.js");
|
|
54315
54377
|
const cds_condition_1 = __webpack_require__(/*! ./cds_condition */ "../core/build/src/cds/expressions/cds_condition.js");
|
|
54316
|
-
const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "../core/build/src/cds/expressions/cds_integer.js");
|
|
54317
54378
|
const cds_string_1 = __webpack_require__(/*! ./cds_string */ "../core/build/src/cds/expressions/cds_string.js");
|
|
54318
54379
|
class CDSPrefixedName extends combi_1.Expression {
|
|
54319
54380
|
getRunnable() {
|
|
@@ -54323,13 +54384,17 @@ class CDSPrefixedName extends combi_1.Expression {
|
|
|
54323
54384
|
const cardinalityJoin = (0, combi_1.seq)("[", cardSpec, ":", joinType, "]");
|
|
54324
54385
|
const cardinalityJoinWhere = (0, combi_1.seq)("[", cardSpec, ":", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
|
|
54325
54386
|
const joinWhere = (0, combi_1.seq)("[", joinType, "WHERE", cds_condition_1.CDSCondition, "]");
|
|
54326
|
-
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");
|
|
54387
|
+
const textCard = (0, combi_1.altPrio)("EXACT ONE TO EXACT ONE", "EXACT ONE TO MANY", "EXACT ONE TO ONE", "MANY TO EXACT ONE", "MANY TO MANY", "MANY TO ONE", "ONE TO EXACT ONE", "ONE TO MANY", "ONE TO ONE", "TO EXACT ONE", "TO ONE", "TO MANY");
|
|
54327
54388
|
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))), "]");
|
|
54328
54389
|
const cardNum = (0, combi_1.altPrio)(cds_integer_1.CDSInteger, "*");
|
|
54329
54390
|
const rangeCard = (0, combi_1.seq)(cds_integer_1.CDSInteger, ".", ".", cardNum);
|
|
54330
54391
|
const rangeCardFilter = (0, combi_1.seq)("[", rangeCard, ":", cds_condition_1.CDSCondition, "]");
|
|
54331
|
-
const
|
|
54332
|
-
const
|
|
54392
|
+
const rangeOnly = (0, combi_1.seq)("[", rangeCard, "]");
|
|
54393
|
+
const numToText = (0, combi_1.seq)(cds_integer_1.CDSInteger, (0, combi_1.altPrio)("TO EXACT ONE", "TO ONE", "TO MANY"));
|
|
54394
|
+
const numTextCardFilter = (0, combi_1.seq)("[", numToText, (0, combi_1.optPrio)((0, combi_1.seq)(":", cds_condition_1.CDSCondition)), "]");
|
|
54395
|
+
const numToNum = (0, combi_1.seq)("[", cds_integer_1.CDSInteger, "TO", cds_integer_1.CDSInteger, (0, combi_1.optPrio)((0, combi_1.seq)(":", cds_condition_1.CDSCondition)), "]");
|
|
54396
|
+
const pathFilter = (0, combi_1.altPrio)(cardinalityJoinWhere, joinWhere, cardinalityJoin, joinRedirect, numToNum, numTextCardFilter, textCardFilter, rangeCardFilter, rangeOnly, (0, combi_1.seq)("[", cardSpec, ":", cds_condition_1.CDSCondition, "]"), (0, combi_1.seq)("[", cardSpec, "]"), (0, combi_1.seq)("[", cds_condition_1.CDSCondition, "]"));
|
|
54397
|
+
const segment = (0, combi_1.seq)(".", (0, combi_1.altPrio)(cds_string_1.CDSString, cds_integer_1.CDSInteger, 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));
|
|
54333
54398
|
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));
|
|
54334
54399
|
}
|
|
54335
54400
|
}
|
|
@@ -54371,10 +54436,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
54371
54436
|
exports.CDSRelation = void 0;
|
|
54372
54437
|
const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index.js");
|
|
54373
54438
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
54439
|
+
const KEYWORDS = ["AS", "ON", "WHERE", "WITH", "UNION", "GROUP", "HAVING",
|
|
54440
|
+
"AND", "OR", "BETWEEN", "LIKE", "IN", "EXISTS",
|
|
54441
|
+
"WHEN", "THEN", "ELSE", "END", "CASE", "CAST"];
|
|
54374
54442
|
class CDSRelation extends combi_1.Expression {
|
|
54375
54443
|
getRunnable() {
|
|
54376
|
-
const
|
|
54377
|
-
|
|
54444
|
+
const word = (0, combi_1.regex)(/^[\w_]+$/);
|
|
54445
|
+
const slashName = (0, combi_1.seq)("/", (0, combi_1.regex)(/^[\w]+$/), "/", (0, combi_1.stopBefore1)(...KEYWORDS), (0, combi_1.regex)(/^[\w_]+$/));
|
|
54446
|
+
const name = (0, combi_1.altPrio)(slashName, word);
|
|
54447
|
+
return (0, combi_1.seq)(name, (0, combi_1.opt)(_1.CDSParametersSelect), (0, combi_1.opt)(_1.CDSAs));
|
|
54378
54448
|
}
|
|
54379
54449
|
}
|
|
54380
54450
|
exports.CDSRelation = CDSRelation;
|
|
@@ -54398,11 +54468,12 @@ const cds_association_1 = __webpack_require__(/*! ./cds_association */ "../core/
|
|
|
54398
54468
|
const cds_join_1 = __webpack_require__(/*! ./cds_join */ "../core/build/src/cds/expressions/cds_join.js");
|
|
54399
54469
|
class CDSSelect extends combi_1.Expression {
|
|
54400
54470
|
getRunnable() {
|
|
54401
|
-
const fields = (0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement);
|
|
54471
|
+
const fields = (0, combi_1.seq)((0, combi_1.stopBefore1)("FROM"), (0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement);
|
|
54402
54472
|
const distinct = (0, combi_1.str)("DISTINCT");
|
|
54403
54473
|
const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.opt)(","));
|
|
54404
54474
|
const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
|
|
54405
|
-
const
|
|
54475
|
+
const typedLiteralVal = (0, combi_1.seq)(_1.CDSType, _1.CDSString);
|
|
54476
|
+
const aspectValue = (0, combi_1.altPrio)(typedLiteralVal, _1.CDSString, _1.CDSPrefixedName);
|
|
54406
54477
|
const aspectBinding = (0, combi_1.seq)(_1.CDSPrefixedName, "=", ">", aspectValue);
|
|
54407
54478
|
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)));
|
|
54408
54479
|
const parenSelect = (0, combi_1.seq)("(", CDSSelect, ")");
|
|
@@ -54477,16 +54548,15 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
54477
54548
|
exports.CDSTableField = void 0;
|
|
54478
54549
|
const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index.js");
|
|
54479
54550
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
54480
|
-
// A single field or association/composition inside a `define table entity { ... }`
|
|
54481
|
-
// inline body. Wraps annotations + name + type together so tooling can iterate
|
|
54482
|
-
// per-field with associated field-level annotations (matches the CDSElement
|
|
54483
|
-
// shape used for select-list elements).
|
|
54484
54551
|
class CDSTableField extends combi_1.Expression {
|
|
54485
54552
|
getRunnable() {
|
|
54486
54553
|
const nullability = (0, combi_1.optPrio)((0, combi_1.alt)("NOT NULL", "NULL"));
|
|
54554
|
+
const excludingNames = (0, combi_1.seq)(_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSName)));
|
|
54555
|
+
const excluding = (0, combi_1.seq)("EXCLUDING", "{", excludingNames, "}");
|
|
54556
|
+
const includeField = (0, combi_1.seq)("INCLUDE", _1.CDSPrefixedName, (0, combi_1.optPrio)((0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.str)("SIGNATURE ONLY"), (0, combi_1.optPrio)(excluding)), (0, combi_1.seq)(excluding, (0, combi_1.optPrio)((0, combi_1.str)("SIGNATURE ONLY"))))));
|
|
54487
54557
|
const field = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.str)("KEY")), _1.CDSName, ":", _1.CDSType, nullability);
|
|
54488
54558
|
const assocOrComp = (0, combi_1.seq)(_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation));
|
|
54489
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.
|
|
54559
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.altPrio)(includeField, assocOrComp, field), ";");
|
|
54490
54560
|
}
|
|
54491
54561
|
}
|
|
54492
54562
|
exports.CDSTableField = CDSTableField;
|
|
@@ -54553,7 +54623,9 @@ const _1 = __webpack_require__(/*! . */ "../core/build/src/cds/expressions/index
|
|
|
54553
54623
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "../core/build/src/abap/2_statements/combi.js");
|
|
54554
54624
|
class CDSWithParameters extends combi_1.Expression {
|
|
54555
54625
|
getRunnable() {
|
|
54556
|
-
const
|
|
54626
|
+
const extNameValue = (0, combi_1.altPrio)(_1.CDSName, (0, combi_1.regex)(/^"(?:[^"]|"")*"$/));
|
|
54627
|
+
const externalName = (0, combi_1.seq)("EXTERNAL", "NAME", extNameValue);
|
|
54628
|
+
const param = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), _1.CDSName, ":", _1.CDSType, (0, combi_1.opt)(externalName), (0, combi_1.star)(_1.CDSAnnotation));
|
|
54557
54629
|
return (0, combi_1.seq)("WITH PARAMETERS", param, (0, combi_1.star)((0, combi_1.seq)(",", param)));
|
|
54558
54630
|
}
|
|
54559
54631
|
}
|
|
@@ -54607,6 +54679,7 @@ __exportStar(__webpack_require__(/*! ./cds_define_hierarchy */ "../core/build/sr
|
|
|
54607
54679
|
__exportStar(__webpack_require__(/*! ./cds_define_projection */ "../core/build/src/cds/expressions/cds_define_projection.js"), exports);
|
|
54608
54680
|
__exportStar(__webpack_require__(/*! ./cds_define_table_entity */ "../core/build/src/cds/expressions/cds_define_table_entity.js"), exports);
|
|
54609
54681
|
__exportStar(__webpack_require__(/*! ./cds_define_table_function */ "../core/build/src/cds/expressions/cds_define_table_function.js"), exports);
|
|
54682
|
+
__exportStar(__webpack_require__(/*! ./cds_paren_select */ "../core/build/src/cds/expressions/cds_paren_select.js"), exports);
|
|
54610
54683
|
__exportStar(__webpack_require__(/*! ./cds_define_view */ "../core/build/src/cds/expressions/cds_define_view.js"), exports);
|
|
54611
54684
|
__exportStar(__webpack_require__(/*! ./cds_element */ "../core/build/src/cds/expressions/cds_element.js"), exports);
|
|
54612
54685
|
__exportStar(__webpack_require__(/*! ./cds_extend_view */ "../core/build/src/cds/expressions/cds_extend_view.js"), exports);
|
|
@@ -68970,7 +69043,7 @@ class Registry {
|
|
|
68970
69043
|
}
|
|
68971
69044
|
static abaplintVersion() {
|
|
68972
69045
|
// magic, see build script "version.js"
|
|
68973
|
-
return "2.120.
|
|
69046
|
+
return "2.120.4";
|
|
68974
69047
|
}
|
|
68975
69048
|
getDDICReferences() {
|
|
68976
69049
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.120.
|
|
3
|
+
"version": "2.120.4",
|
|
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.120.
|
|
42
|
+
"@abaplint/core": "^2.120.4",
|
|
43
43
|
"@types/chai": "^4.3.20",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|