@abaplint/core 2.102.27 → 2.102.29

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.
@@ -15,7 +15,8 @@ class SimpleTarget extends combi_1.Expression {
15
15
  const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), attribute_name_1.AttributeName);
16
16
  const start = (0, combi_1.altPrio)(cast, clas, _1.TargetField, _1.TargetFieldSymbol);
17
17
  const fields = (0, combi_1.seq)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength));
18
- return (0, combi_1.seq)(start, something, fields);
18
+ const optional = (0, combi_1.altPrio)(_1.TableBody, fields);
19
+ return (0, combi_1.seq)(start, something, optional);
19
20
  }
20
21
  }
21
22
  exports.SimpleTarget = SimpleTarget;
@@ -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
  }
@@ -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
  }
@@ -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.27";
68
+ return "2.102.29";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -1236,7 +1236,7 @@ ${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n`
1236
1236
  return undefined;
1237
1237
  }
1238
1238
  const sourceRef = (_a = high.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.CorrespondingBody);
1239
- if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 1) {
1239
+ if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 1 && target.concatTokens().toUpperCase().startsWith("DATA(") === false) {
1240
1240
  const code = `MOVE-CORRESPONDING ${sourceRef.concatTokens()} TO ${target.concatTokens()}`;
1241
1241
  const start = high.getFirstToken().getStart();
1242
1242
  const end = high.getLastToken().getStart();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.102.27",
3
+ "version": "2.102.29",
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.2",
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",