@abaplint/core 2.115.7 → 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
  }
@@ -9,7 +9,7 @@ const types_1 = require("./types");
9
9
  const define_1 = require("./define");
10
10
  class Data {
11
11
  getMatcher() {
12
- return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.DataBegin), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Data), (0, _combi_1.sta)(Statements.Include), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sub)(constants_1.Constants), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sub)(types_1.Types), (0, _combi_1.sub)(enhancement_1.Enhancement), (0, _combi_1.sub)(define_1.Define), (0, _combi_1.sta)(Statements.IncludeType), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.EnhancementPoint))), (0, _combi_1.sta)(Statements.DataEnd));
12
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.DataBegin), (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Data), (0, _combi_1.sta)(Statements.Include), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sub)(constants_1.Constants), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sub)(types_1.Types), (0, _combi_1.sub)(enhancement_1.Enhancement), (0, _combi_1.sub)(define_1.Define), (0, _combi_1.sta)(Statements.IncludeType), (0, _combi_1.sta)(Statements.Parameter), (0, _combi_1.sta)(Statements.SelectionScreen), (0, _combi_1.sta)(Statements.SelectOption), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.EnhancementPoint))), (0, _combi_1.sta)(Statements.DataEnd));
13
13
  }
14
14
  }
15
15
  exports.Data = Data;
@@ -14,6 +14,8 @@ const include_type_1 = require("../statements/include_type");
14
14
  const constant_1 = require("../statements/constant");
15
15
  const constants_1 = require("./constants");
16
16
  const ranges_1 = require("../statements/ranges");
17
+ const selectoption_1 = require("../statements/selectoption");
18
+ const parameter_1 = require("../statements/parameter");
17
19
  class Data {
18
20
  static runSyntax(node, input) {
19
21
  var _a;
@@ -113,6 +115,12 @@ class Data {
113
115
  else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.Ranges) {
114
116
  new ranges_1.Ranges().runSyntax(c, input);
115
117
  }
118
+ else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.SelectOption) {
119
+ new selectoption_1.SelectOption().runSyntax(c, input);
120
+ }
121
+ else if (c instanceof nodes_1.StatementNode && ctyp instanceof Statements.Parameter) {
122
+ new parameter_1.Parameter().runSyntax(c, input);
123
+ }
116
124
  else if (c instanceof nodes_1.StructureNode && ctyp instanceof Structures.Constants) {
117
125
  const { type: found, values: _ } = new constants_1.Constants().runSyntax(c, input);
118
126
  if (found) {
@@ -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.7";
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.7",
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",