@abaplint/core 2.91.36 → 2.91.37

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.
@@ -615,6 +615,10 @@ declare class CDSDefineAbstract extends Expression {
615
615
  getRunnable(): IStatementRunnable;
616
616
  }
617
617
 
618
+ declare class CDSDefineProjection extends Expression {
619
+ getRunnable(): IStatementRunnable;
620
+ }
621
+
618
622
  declare class CDSDefineView extends Expression {
619
623
  getRunnable(): IStatementRunnable;
620
624
  }
@@ -2014,6 +2018,7 @@ declare namespace ExpressionsCDS {
2014
2018
  CDSComposition,
2015
2019
  CDSCondition,
2016
2020
  CDSDefineAbstract,
2021
+ CDSDefineProjection,
2017
2022
  CDSDefineView,
2018
2023
  CDSElement,
2019
2024
  CDSFunction,
@@ -18,6 +18,9 @@ class CDSParser {
18
18
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
19
19
  res = combi_1.Combi.run(new Expressions.CDSDefineAbstract(), tokens, version_1.defaultVersion);
20
20
  }
21
+ if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
22
+ res = combi_1.Combi.run(new Expressions.CDSDefineProjection(), tokens, version_1.defaultVersion);
23
+ }
21
24
  if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
22
25
  return undefined;
23
26
  }
@@ -5,7 +5,8 @@ const _1 = require(".");
5
5
  const combi_1 = require("../../abap/2_statements/combi");
6
6
  class CDSAggregate extends combi_1.Expression {
7
7
  getRunnable() {
8
- const value = (0, combi_1.alt)(_1.CDSName, _1.CDSCast, _1.CDSCase);
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
10
  return (0, combi_1.seq)((0, combi_1.alt)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
10
11
  }
11
12
  }
@@ -6,7 +6,7 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  const cds_name_1 = require("./cds_name");
7
7
  class CDSDefineAbstract extends combi_1.Expression {
8
8
  getRunnable() {
9
- const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("KEY"), cds_name_1.CDSName, ":", cds_name_1.CDSName, ";");
9
+ const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", _1.CDSType, ";");
10
10
  return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE ABSTRACT ENTITY"), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)(field), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
11
11
  }
12
12
  }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CDSDefineProjection = void 0;
4
+ const _1 = require(".");
5
+ const __1 = require("../..");
6
+ const combi_1 = require("../../abap/2_statements/combi");
7
+ class CDSDefineProjection extends combi_1.Expression {
8
+ getRunnable() {
9
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, "PROVIDER CONTRACT", _1.CDSName, "AS PROJECTION ON", _1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
10
+ }
11
+ }
12
+ exports.CDSDefineProjection = CDSDefineProjection;
13
+ //# sourceMappingURL=cds_define_projection.js.map
@@ -29,6 +29,7 @@ __exportStar(require("./cds_cast"), exports);
29
29
  __exportStar(require("./cds_composition"), exports);
30
30
  __exportStar(require("./cds_condition"), exports);
31
31
  __exportStar(require("./cds_define_abstract"), exports);
32
+ __exportStar(require("./cds_define_projection"), exports);
32
33
  __exportStar(require("./cds_define_view"), exports);
33
34
  __exportStar(require("./cds_element"), exports);
34
35
  __exportStar(require("./cds_function"), exports);
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.91.36";
71
+ return "2.91.37";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.91.36",
3
+ "version": "2.91.37",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",