@abaplint/core 2.93.89 → 2.93.92

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.
@@ -809,7 +809,9 @@ declare class Class extends ABAPObject {
809
809
 
810
810
  declare class ClassAttribute extends TypedIdentifier {
811
811
  private readonly visibility;
812
- constructor(id: TypedIdentifier, visibility: Visibility, meta: readonly IdentifierMeta[]);
812
+ constructor(id: TypedIdentifier, visibility: Visibility, meta: readonly IdentifierMeta[], value?: string | {
813
+ [index: string]: string;
814
+ });
813
815
  getVisibility(): Visibility;
814
816
  }
815
817
 
@@ -12,9 +12,19 @@ class DataDefinition {
12
12
  if (tt) {
13
13
  return new type_table_1.TypeTable().runSyntax(node, scope, filename);
14
14
  }
15
+ const valueNode = node.findFirstExpression(Expressions.Value);
16
+ let value = undefined;
17
+ if (valueNode) {
18
+ value = new basic_types_1.BasicTypes(filename, scope).findValue(node);
19
+ }
15
20
  const bfound = new basic_types_1.BasicTypes(filename, scope).simpleType(node);
16
21
  if (bfound) {
17
- return bfound;
22
+ if (value) {
23
+ return new _typed_identifier_1.TypedIdentifier(bfound.getToken(), filename, bfound.getType(), bfound.getMeta(), value);
24
+ }
25
+ else {
26
+ return bfound;
27
+ }
18
28
  }
19
29
  const name = node.findFirstExpression(Expressions.DefinitionName);
20
30
  if (name) {
@@ -13,9 +13,8 @@ class ClassData {
13
13
  if (found === undefined) {
14
14
  return undefined;
15
15
  }
16
- const meta = found.getMeta().slice();
17
- meta.push("static" /* IdentifierMeta.Static */);
18
- return new _typed_identifier_1.TypedIdentifier(found.getToken(), filename, found.getType(), meta);
16
+ const meta = [...found.getMeta(), "static" /* IdentifierMeta.Static */];
17
+ return new _typed_identifier_1.TypedIdentifier(found.getToken(), filename, found.getType(), meta, found.getValue());
19
18
  }
20
19
  const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);
21
20
  if (fallback) {
@@ -5,13 +5,8 @@ const Expressions = require("../../2_statements/expressions");
5
5
  const _typed_identifier_1 = require("../../types/_typed_identifier");
6
6
  const data_definition_1 = require("../expressions/data_definition");
7
7
  const unknown_type_1 = require("../../types/basic/unknown_type");
8
- const basic_types_1 = require("../basic_types");
9
8
  class Data {
10
9
  runSyntax(node, scope, filename) {
11
- const val = node.findFirstExpression(Expressions.Value);
12
- if (val) {
13
- new basic_types_1.BasicTypes(filename, scope).findValue(node);
14
- }
15
10
  const dd = node.findFirstExpression(Expressions.DataDefinition);
16
11
  if (dd) {
17
12
  return new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
@@ -11,7 +11,7 @@ class VoidType extends _abstract_type_1.AbstractType {
11
11
  return this.voided;
12
12
  }
13
13
  toABAP() {
14
- throw new Error("void, generic");
14
+ return this.voided || "VOIDEDtoABAP";
15
15
  }
16
16
  toText() {
17
17
  return "Void(" + this.voided + ")";
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClassAttribute = void 0;
4
4
  const _typed_identifier_1 = require("./_typed_identifier");
5
5
  class ClassAttribute extends _typed_identifier_1.TypedIdentifier {
6
- constructor(id, visibility, meta) {
7
- super(id.getToken(), id.getFilename(), id.getType(), meta);
6
+ constructor(id, visibility, meta, value) {
7
+ super(id.getToken(), id.getFilename(), id.getType(), meta, value);
8
8
  this.visibility = visibility;
9
9
  }
10
10
  getVisibility() {
@@ -205,7 +205,7 @@ class Attributes {
205
205
  throw new Error("ClassAttribute, unexpected node, " + this.filename);
206
206
  }
207
207
  scope.addIdentifier(found);
208
- return new class_attribute_1.ClassAttribute(found, visibility, found.getMeta());
208
+ return new class_attribute_1.ClassAttribute(found, visibility, found.getMeta(), found.getValue());
209
209
  }
210
210
  }
211
211
  exports.Attributes = Attributes;
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.89";
66
+ return "2.93.92";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.89",
3
+ "version": "2.93.92",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",