@abaplint/core 2.102.28 → 2.102.30

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.
@@ -10,7 +10,8 @@ class TypeTableKey extends combi_1.Expression {
10
10
  const defaultKey = "DEFAULT KEY";
11
11
  const emptyKey = (0, combi_1.ver)(version_1.Version.v740sp02, "EMPTY KEY");
12
12
  const components = (0, combi_1.plus)((0, combi_1.alt)((0, combi_1.seq)("WITH", (0, combi_1.failStar)()), _1.FieldSub));
13
- const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, "COMPONENTS", components), components))), (0, combi_1.optPrio)("READ-ONLY"));
13
+ const further = (0, combi_1.seq)((0, combi_1.alt)("WITHOUT", "WITH"), "FURTHER SECONDARY KEYS");
14
+ const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
14
15
  return key;
15
16
  }
16
17
  }
@@ -10,7 +10,7 @@ class CallFunction {
10
10
  const update = (0, combi_1.verNot)(version_1.Version.Cloud, (0, combi_1.str)("IN UPDATE TASK"));
11
11
  const unit = (0, combi_1.seq)("UNIT", expressions_1.Source);
12
12
  const background = (0, combi_1.verNot)(version_1.Version.Cloud, (0, combi_1.seq)("IN BACKGROUND", (0, combi_1.altPrio)("TASK", unit)));
13
- const calling = (0, combi_1.seq)("CALLING", expressions_1.MethodName, "ON END OF TASK");
13
+ const calling = (0, combi_1.seq)("CALLING", expressions_1.MethodSource, "ON END OF TASK");
14
14
  const performing = (0, combi_1.seq)("PERFORMING", expressions_1.FormName, "ON END OF TASK");
15
15
  const separate = (0, combi_1.str)("AS SEPARATE UNIT");
16
16
  const keeping = (0, combi_1.str)("KEEPING LOGICAL UNIT OF WORK");
@@ -9,7 +9,7 @@ class TypeMesh {
9
9
  const on = (0, combi_1.seq)("ON", expressions_1.NamespaceSimpleName, "=", expressions_1.NamespaceSimpleName, (0, combi_1.star)((0, combi_1.seq)("AND", expressions_1.NamespaceSimpleName, "=", expressions_1.NamespaceSimpleName)));
10
10
  const using = (0, combi_1.seq)("USING KEY", expressions_1.NamespaceSimpleName);
11
11
  const association = (0, combi_1.seq)("ASSOCIATION", expressions_1.NamespaceSimpleName, "TO", expressions_1.NamespaceSimpleName, (0, combi_1.plus)(on));
12
- const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", expressions_1.NamespaceSimpleName, "TYPE", expressions_1.TypeName, (0, combi_1.plus)(association), (0, combi_1.opt)(using)));
12
+ const ret = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("TYPES", expressions_1.NamespaceSimpleName, "TYPE", (0, combi_1.opt)("REF TO"), expressions_1.TypeName, (0, combi_1.plus)(association), (0, combi_1.opt)(using)));
13
13
  return ret;
14
14
  }
15
15
  }
@@ -58,6 +58,9 @@ class CurrentScope {
58
58
  if (this.current.getData().types[upper] !== undefined) {
59
59
  throw new Error(`Type name "${name}" already defined`);
60
60
  }
61
+ else if (this.isOO() && this.current.getData().vars[upper] !== undefined) {
62
+ throw new Error(`"${name}" already defined`);
63
+ }
61
64
  this.current.getData().types[upper] = type;
62
65
  }
63
66
  addExtraLikeType(type) {
@@ -107,6 +110,9 @@ class CurrentScope {
107
110
  if (this.current.getData().vars[upper] !== undefined) {
108
111
  throw new Error(`Variable name "${name}" already defined`);
109
112
  }
113
+ else if (this.isOO() && this.current.getData().types[upper] !== undefined) {
114
+ throw new Error(`"${name}" already defined`);
115
+ }
110
116
  this.current.getData().vars[upper] = identifier;
111
117
  }
112
118
  addIdentifier(identifier) {
@@ -373,7 +379,7 @@ class CurrentScope {
373
379
  while (curr !== undefined) {
374
380
  const stype = curr.getIdentifier().stype;
375
381
  if (stype === _scope_type_1.ScopeType.ClassDefinition
376
- || stype === _scope_type_1.ScopeType.ClassImplementation
382
+ // || stype === ScopeType.ClassImplementation
377
383
  || stype === _scope_type_1.ScopeType.Interface) {
378
384
  return true;
379
385
  }
@@ -7,6 +7,7 @@ const dynamic_1 = require("../expressions/dynamic");
7
7
  const basic_1 = require("../../types/basic");
8
8
  class Sort {
9
9
  runSyntax(node, scope, filename) {
10
+ var _a, _b;
10
11
  for (const s of node.findDirectExpressions(Expressions.Dynamic)) {
11
12
  new dynamic_1.Dynamic().runSyntax(s, scope, filename);
12
13
  }
@@ -14,6 +15,9 @@ class Sort {
14
15
  if (tnode) {
15
16
  const ttype = new target_1.Target().runSyntax(tnode, scope, filename);
16
17
  if (ttype instanceof basic_1.TableType) {
18
+ if (((_b = (_a = ttype.getOptions()) === null || _a === void 0 ? void 0 : _a.primaryKey) === null || _b === void 0 ? void 0 : _b.type) === basic_1.TableAccessType.sorted) {
19
+ throw new Error(`Sorted table, already sorted`);
20
+ }
17
21
  const rowType = ttype.getRowType();
18
22
  if (!(rowType instanceof basic_1.VoidType)
19
23
  && !(rowType instanceof basic_1.UnknownType)
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.102.28";
68
+ return "2.102.30";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.102.28",
3
+ "version": "2.102.30",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,14 +53,14 @@
53
53
  "@microsoft/api-extractor": "^7.36.4",
54
54
  "@types/chai": "^4.3.5",
55
55
  "@types/mocha": "^10.0.1",
56
- "@types/node": "^20.5.3",
57
- "chai": "^4.3.7",
58
- "eslint": "^8.47.0",
56
+ "@types/node": "^20.5.7",
57
+ "chai": "^4.3.8",
58
+ "eslint": "^8.48.0",
59
59
  "mocha": "^10.2.0",
60
60
  "c8": "^8.0.1",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "^1.3.0",
63
- "typescript": "^5.1.6"
63
+ "typescript": "^5.2.2"
64
64
  },
65
65
  "dependencies": {
66
66
  "fast-xml-parser": "^4.2.7",