@abaplint/core 2.102.5 → 2.102.6

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.
@@ -7,16 +7,16 @@ const data_definition_1 = require("../expressions/data_definition");
7
7
  const unknown_type_1 = require("../../types/basic/unknown_type");
8
8
  class Data {
9
9
  runSyntax(node, scope, filename) {
10
+ const name = node.findFirstExpression(Expressions.DefinitionName);
10
11
  const dd = node.findFirstExpression(Expressions.DataDefinition);
11
12
  if (dd) {
12
13
  const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
13
14
  if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
14
15
  && (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
15
- throw new Error("DATA definition cannot be generic");
16
+ throw new Error("DATA definition cannot be generic, " + name);
16
17
  }
17
18
  return id;
18
19
  }
19
- const name = node.findFirstExpression(Expressions.DefinitionName);
20
20
  if (name) {
21
21
  return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new unknown_type_1.UnknownType("data, fallback"));
22
22
  }
@@ -30,7 +30,7 @@ class TableType extends _abstract_object_1.AbstractObject {
30
30
  super.setDirty();
31
31
  }
32
32
  buildTableOptions() {
33
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
33
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
34
34
  let primaryKey = undefined;
35
35
  if (((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.accessmode) === "S") {
36
36
  primaryKey = {
@@ -56,15 +56,19 @@ class TableType extends _abstract_object_1.AbstractObject {
56
56
  if (((_f = this.parsedXML) === null || _f === void 0 ? void 0 : _f.keydef) === "T" && (primaryKey === null || primaryKey === void 0 ? void 0 : primaryKey.keyFields.length) === 0) {
57
57
  primaryKey === null || primaryKey === void 0 ? void 0 : primaryKey.keyFields.push("table_line");
58
58
  }
59
+ let keyType = Types.TableKeyType.user;
60
+ if (((_g = this.parsedXML) === null || _g === void 0 ? void 0 : _g.keydef) === "D") {
61
+ keyType = Types.TableKeyType.default;
62
+ }
59
63
  const tableOptions = {
60
64
  withHeader: false,
61
- keyType: Types.TableKeyType.user,
65
+ keyType: keyType,
62
66
  primaryKey: primaryKey,
63
67
  secondary: [],
64
68
  };
65
- for (const k of ((_g = this.parsedXML) === null || _g === void 0 ? void 0 : _g.dd43v) || []) {
69
+ for (const k of ((_h = this.parsedXML) === null || _h === void 0 ? void 0 : _h.dd43v) || []) {
66
70
  const fields = [];
67
- for (const f of ((_h = this.parsedXML) === null || _h === void 0 ? void 0 : _h.dd42v) || []) {
71
+ for (const f of ((_j = this.parsedXML) === null || _j === void 0 ? void 0 : _j.dd42v) || []) {
68
72
  if (f.keyname === k.keyname) {
69
73
  fields.push(f.keyfield);
70
74
  }
@@ -80,7 +84,7 @@ class TableType extends _abstract_object_1.AbstractObject {
80
84
  default:
81
85
  break;
82
86
  }
83
- (_j = tableOptions.secondary) === null || _j === void 0 ? void 0 : _j.push({
87
+ (_k = tableOptions.secondary) === null || _k === void 0 ? void 0 : _k.push({
84
88
  name: k.keyname,
85
89
  type: accessType,
86
90
  keyFields: fields,
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.102.5";
68
+ return "2.102.6";
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.5",
3
+ "version": "2.102.6",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",