@abaplint/core 2.113.48 → 2.113.49

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.
@@ -835,6 +835,10 @@ declare class CDSFunction extends Expression {
835
835
  getRunnable(): IStatementRunnable;
836
836
  }
837
837
 
838
+ declare class CDSFunctionInput extends Expression {
839
+ getRunnable(): IStatementRunnable;
840
+ }
841
+
838
842
  declare class CDSGroupBy extends Expression {
839
843
  getRunnable(): IStatementRunnable;
840
844
  }
@@ -2408,6 +2412,7 @@ declare namespace ExpressionsCDS {
2408
2412
  CDSElement,
2409
2413
  CDSExtendView,
2410
2414
  CDSFunction,
2415
+ CDSFunctionInput,
2411
2416
  CDSGroupBy,
2412
2417
  CDSHaving,
2413
2418
  CDSInteger,
@@ -6,7 +6,7 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSAggregate extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
9
- const value = (0, combi_1.alt)(name, _1.CDSCast, _1.CDSCase);
9
+ const value = (0, combi_1.alt)(name, "*", _1.CDSCast, _1.CDSCase, _1.CDSFunction);
10
10
  return (0, combi_1.seq)((0, combi_1.alt)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
11
11
  }
12
12
  }
@@ -9,7 +9,10 @@ class CDSArithmetics extends combi_1.Expression {
9
9
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
10
10
  const val = (0, combi_1.alt)(cds_integer_1.CDSInteger, name, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString);
11
11
  const operator = (0, combi_1.altPrio)("+", "-", "*", "/");
12
- return (0, combi_1.seq)(val, operator, val);
12
+ const operatorValue = (0, combi_1.seq)(operator, val);
13
+ const paren = (0, combi_1.seq)("(", val, (0, combi_1.plus)(operatorValue), ")");
14
+ const noParen = (0, combi_1.seq)(val, (0, combi_1.plus)(operatorValue));
15
+ return (0, combi_1.altPrio)(paren, noParen);
13
16
  }
14
17
  }
15
18
  exports.CDSArithmetics = CDSArithmetics;
@@ -5,40 +5,43 @@ const _1 = require(".");
5
5
  const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSFunction extends combi_1.Expression {
7
7
  getRunnable() {
8
- const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
9
- const input = (0, combi_1.altPrio)(_1.CDSCast, CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
10
- const coalesce = (0, combi_1.seq)("COALESCE", "(", input, ",", input, ")");
11
- const concat = (0, combi_1.seq)("CONCAT", "(", input, ",", input, ")");
12
- const concat_with_space = (0, combi_1.seq)("CONCAT_WITH_SPACE", "(", input, ",", input, ",", input, ")");
13
- const dats_add_days = (0, combi_1.seq)("DATS_ADD_DAYS", "(", input, ",", input, ",", input, ")");
14
- const dats_add_months = (0, combi_1.seq)("DATS_ADD_MONTHS", "(", input, ",", input, ",", input, ")");
15
- const dats_days_between = (0, combi_1.seq)("DATS_DAYS_BETWEEN", "(", input, ",", input, ")");
16
- const dats_is_valid = (0, combi_1.seq)("DATS_IS_VALID", "(", input, ")");
17
- const substring = (0, combi_1.seq)("SUBSTRING", "(", input, ",", input, ",", input, ")");
18
- const bintohex = (0, combi_1.seq)("BINTOHEX", "(", input, ")");
19
- const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", input, ")");
20
- const upper = (0, combi_1.seq)("UPPER", "(", input, ")");
21
- const lower = (0, combi_1.seq)("LOWER", "(", input, ")");
22
- const abs = (0, combi_1.seq)("ABS", "(", input, ")");
23
- const ceil = (0, combi_1.seq)("CEIL", "(", input, ")");
24
- const floor = (0, combi_1.seq)("FLOOR", "(", input, ")");
25
- const round = (0, combi_1.seq)("ROUND", "(", input, ",", input, ")");
26
- const div = (0, combi_1.seq)("DIV", "(", input, ",", input, ")");
27
- const division = (0, combi_1.seq)("DIVISION", "(", input, ",", input, ")");
28
- const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", input, ",", input, ",", input, ",", input, ")");
29
- const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", input, ",", input, ",", input, ",", input, ")");
30
- const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", input, ",", input, ",", input, ",", input, ")");
31
- const dats_tims_to_tstmp = (0, combi_1.seq)("DATS_TIMS_TO_TSTMP", "(", input, ",", input, ",", input, ",", input, ",", input, ")");
32
- const tstmp_is_valid = (0, combi_1.seq)("TSTMP_IS_VALID", "(", input, ")");
8
+ const coalesce = (0, combi_1.seq)("COALESCE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
9
+ const concat = (0, combi_1.seq)("CONCAT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
10
+ const concat_with_space = (0, combi_1.seq)("CONCAT_WITH_SPACE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
11
+ const dats_add_days = (0, combi_1.seq)("DATS_ADD_DAYS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
12
+ const dats_add_months = (0, combi_1.seq)("DATS_ADD_MONTHS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
13
+ const dats_days_between = (0, combi_1.seq)("DATS_DAYS_BETWEEN", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
14
+ const dats_is_valid = (0, combi_1.seq)("DATS_IS_VALID", "(", _1.CDSFunctionInput, ")");
15
+ const substring = (0, combi_1.seq)("SUBSTRING", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
16
+ const bintohex = (0, combi_1.seq)("BINTOHEX", "(", _1.CDSFunctionInput, ")");
17
+ const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", _1.CDSFunctionInput, ")");
18
+ const upper = (0, combi_1.seq)("UPPER", "(", _1.CDSFunctionInput, ")");
19
+ const lower = (0, combi_1.seq)("LOWER", "(", _1.CDSFunctionInput, ")");
20
+ const abs = (0, combi_1.seq)("ABS", "(", _1.CDSFunctionInput, ")");
21
+ const ceil = (0, combi_1.seq)("CEIL", "(", _1.CDSFunctionInput, ")");
22
+ const floor = (0, combi_1.seq)("FLOOR", "(", _1.CDSFunctionInput, ")");
23
+ const round = (0, combi_1.seq)("ROUND", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
24
+ const div = (0, combi_1.seq)("DIV", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
25
+ const division = (0, combi_1.seq)("DIVISION", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
26
+ const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
27
+ const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
28
+ const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
29
+ const dats_tims_to_tstmp = (0, combi_1.seq)("DATS_TIMS_TO_TSTMP", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
30
+ const tstmp_is_valid = (0, combi_1.seq)("TSTMP_IS_VALID", "(", _1.CDSFunctionInput, ")");
33
31
  const tstmp_current_utctimestamp = (0, combi_1.seq)("TSTMP_CURRENT_UTCTIMESTAMP", "(", ")");
34
- const tstmp_seconds_between = (0, combi_1.seq)("TSTMP_SECONDS_BETWEEN", "(", input, ",", input, ",", input, ")");
35
- const tstmp_add_seconds = (0, combi_1.seq)("TSTMP_ADD_SECONDS", "(", input, ",", input, ",", input, ")");
36
- const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", input, ",", input, ")");
37
- const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", input, ",", input, ",", input, ")");
38
- const mod = (0, combi_1.seq)("MOD", "(", input, ",", input, ")");
39
- const left = (0, combi_1.seq)("LEFT", "(", input, ",", input, ")");
40
- const right = (0, combi_1.seq)("RIGHT", "(", input, ",", input, ")");
41
- 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, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right);
32
+ const tstmp_seconds_between = (0, combi_1.seq)("TSTMP_SECONDS_BETWEEN", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
33
+ const tstmp_add_seconds = (0, combi_1.seq)("TSTMP_ADD_SECONDS", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
34
+ const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
35
+ const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
36
+ const mod = (0, combi_1.seq)("MOD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
37
+ const left = (0, combi_1.seq)("LEFT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
38
+ const right = (0, combi_1.seq)("RIGHT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
39
+ const conversionInput = (0, combi_1.seq)(_1.CDSName, "=", ">", _1.CDSFunctionInput);
40
+ const conversionInputs = (0, combi_1.seq)(conversionInput, (0, combi_1.starPrio)((0, combi_1.seq)(",", conversionInput)));
41
+ const unitConversion = (0, combi_1.seq)("UNIT_CONVERSION", "(", conversionInputs, ")");
42
+ const currencyConversion = (0, combi_1.seq)("CURRENCY_CONVERSION", "(", conversionInputs, ")");
43
+ const decimalShift = (0, combi_1.seq)("DECIMAL_SHIFT", "(", conversionInputs, ")");
44
+ 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, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right, unitConversion, currencyConversion, decimalShift);
42
45
  }
43
46
  }
44
47
  exports.CDSFunction = CDSFunction;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CDSFunctionInput = void 0;
4
+ const _1 = require(".");
5
+ const combi_1 = require("../../abap/2_statements/combi");
6
+ class CDSFunctionInput extends combi_1.Expression {
7
+ getRunnable() {
8
+ const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.starPrio)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
9
+ const input = (0, combi_1.altPrio)(_1.CDSCast, _1.CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString, qualified, (0, combi_1.regex)(/^\d+$/));
10
+ return input;
11
+ }
12
+ }
13
+ exports.CDSFunctionInput = CDSFunctionInput;
14
+ //# sourceMappingURL=cds_function_input.js.map
@@ -35,6 +35,7 @@ __exportStar(require("./cds_define_view"), exports);
35
35
  __exportStar(require("./cds_element"), exports);
36
36
  __exportStar(require("./cds_extend_view"), exports);
37
37
  __exportStar(require("./cds_function"), exports);
38
+ __exportStar(require("./cds_function_input"), exports);
38
39
  __exportStar(require("./cds_group_by"), exports);
39
40
  __exportStar(require("./cds_having"), exports);
40
41
  __exportStar(require("./cds_integer"), exports);
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.48";
70
+ return "2.113.49";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.48",
3
+ "version": "2.113.49",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",