@abaplint/core 2.93.91 → 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.
- package/build/abaplint.d.ts +3 -1
- package/build/src/abap/5_syntax/expressions/data_definition.js +11 -1
- package/build/src/abap/5_syntax/statements/class_data.js +2 -3
- package/build/src/abap/5_syntax/statements/data.js +0 -5
- package/build/src/abap/types/class_attribute.js +2 -2
- package/build/src/abap/types/class_attributes.js +1 -1
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -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
|
-
|
|
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().
|
|
17
|
-
|
|
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);
|
|
@@ -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;
|
package/build/src/registry.js
CHANGED