@abaplint/core 2.115.8 → 2.115.9

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.
@@ -1708,6 +1708,15 @@ declare class DataReference extends AbstractType {
1708
1708
  toCDS(): string;
1709
1709
  }
1710
1710
 
1711
+ declare class DatastoreObject extends AbstractObject {
1712
+ getType(): string;
1713
+ getAllowedNaming(): {
1714
+ maxLength: number;
1715
+ allowNamespace: boolean;
1716
+ };
1717
+ getDescription(): string | undefined;
1718
+ }
1719
+
1711
1720
  declare class DataType extends AbstractType {
1712
1721
  toText(): string;
1713
1722
  toABAP(): string;
@@ -5052,6 +5061,7 @@ declare namespace Objects {
5052
5061
  ParsedDataDefinition,
5053
5062
  DataDefinition,
5054
5063
  DataElement,
5064
+ DatastoreObject,
5055
5065
  DialogModule,
5056
5066
  Documentation,
5057
5067
  DomainValue,
@@ -7,14 +7,16 @@ const version_1 = require("../../../version");
7
7
  const tokens_1 = require("../../1_lexer/tokens");
8
8
  class Field {
9
9
  getMatcher() {
10
- const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)((0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST", "AT CURSOR-SELECTION")));
10
+ const moduleOptions = (0, combi_1.alt)("ON INPUT", "ON REQUEST", "ON CHAIN-REQUEST", "ON CHAIN-INPUT", "AT CURSOR-SELECTION");
11
+ const module = (0, combi_1.seq)("MODULE", expressions_1.FormName, (0, combi_1.opt)(moduleOptions));
12
+ const moduleStrange = (0, combi_1.seq)(moduleOptions, "MODULE", expressions_1.FormName);
11
13
  const values = (0, combi_1.seq)("VALUES", (0, combi_1.tok)(tokens_1.WParenLeft), "BETWEEN", expressions_1.Constant, "AND", expressions_1.Constant, (0, combi_1.tok)(tokens_1.ParenRightW));
12
- const wit = (0, combi_1.seq)("WITH", expressions_1.FieldChain);
14
+ const wit = (0, combi_1.seq)("WITH", (0, combi_1.altPrio)(expressions_1.FieldChain, expressions_1.Constant));
13
15
  const cond = (0, combi_1.seq)(expressions_1.FieldChain, "=", expressions_1.FieldChain);
14
16
  const where = (0, combi_1.seq)(cond, (0, combi_1.starPrio)((0, combi_1.seq)("AND", cond)));
15
17
  const into = (0, combi_1.seq)("INTO", expressions_1.FieldChain);
16
18
  const select = (0, combi_1.seq)("SELECT * FROM", expressions_1.FieldChain, "WHERE", where, (0, combi_1.opt)(into), (0, combi_1.opt)("WHENEVER NOT FOUND SEND ERRORMESSAGE"));
17
- const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, values, wit, select)));
19
+ const ret = (0, combi_1.seq)("FIELD", expressions_1.FieldChain, (0, combi_1.opt)((0, combi_1.altPrio)(module, moduleStrange, values, wit, select)));
18
20
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
19
21
  }
20
22
  }
@@ -15,6 +15,7 @@ const _object_oriented_1 = require("../5_syntax/_object_oriented");
15
15
  const _reference_1 = require("../5_syntax/_reference");
16
16
  class ClassDefinition extends _identifier_1.Identifier {
17
17
  constructor(node, input) {
18
+ var _a;
18
19
  if (!(node.get() instanceof Structures.ClassDefinition)) {
19
20
  throw new Error("ClassDefinition, unexpected node type");
20
21
  }
@@ -37,6 +38,10 @@ class ClassDefinition extends _identifier_1.Identifier {
37
38
  this.aliases = this.attributes.getAliases();
38
39
  const events = node.findAllStatements(Statements.Events);
39
40
  for (const e of events) {
41
+ const eventName = (_a = e.findDirectExpression(Expressions.EventName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
42
+ if (this.events.find(ev => ev.getName().toUpperCase() === eventName) !== undefined) {
43
+ throw new Error("Event " + eventName + " already defined");
44
+ }
40
45
  this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, input)); // todo, all these are not Public
41
46
  }
42
47
  this.methodDefs = new method_definitions_1.MethodDefinitions(node, input);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DatastoreObject = void 0;
4
+ const _abstract_object_1 = require("./_abstract_object");
5
+ class DatastoreObject extends _abstract_object_1.AbstractObject {
6
+ getType() {
7
+ return "ODSO";
8
+ }
9
+ getAllowedNaming() {
10
+ return {
11
+ maxLength: 200,
12
+ allowNamespace: true,
13
+ };
14
+ }
15
+ getDescription() {
16
+ // todo
17
+ return undefined;
18
+ }
19
+ }
20
+ exports.DatastoreObject = DatastoreObject;
21
+ //# sourceMappingURL=datastore_object.js.map
@@ -64,6 +64,7 @@ __exportStar(require("./customizing_transaction"), exports);
64
64
  __exportStar(require("./data_control"), exports);
65
65
  __exportStar(require("./data_definition"), exports);
66
66
  __exportStar(require("./data_element"), exports);
67
+ __exportStar(require("./datastore_object"), exports);
67
68
  __exportStar(require("./dialog_module"), exports);
68
69
  __exportStar(require("./documentation"), exports);
69
70
  __exportStar(require("./domain"), exports);
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.115.8";
77
+ return "2.115.9";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.115.8",
3
+ "version": "2.115.9",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",