@abaplint/core 2.93.91 → 2.93.93
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 +8 -4
- package/build/src/abap/5_syntax/_builtin.js +1 -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/basic/_abstract_type.js +5 -1
- package/build/src/abap/types/basic/character_type.js +2 -2
- package/build/src/abap/types/class_attribute.js +2 -2
- package/build/src/abap/types/class_attributes.js +1 -1
- package/build/src/ddic.js +8 -8
- package/build/src/lsp/_lookup.js +8 -5
- package/build/src/objects/domain.js +1 -1
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
package/build/abaplint.d.ts
CHANGED
|
@@ -95,9 +95,11 @@ declare abstract class AbstractObject implements IObject {
|
|
|
95
95
|
|
|
96
96
|
export declare abstract class AbstractType {
|
|
97
97
|
private readonly qualifiedName;
|
|
98
|
-
|
|
98
|
+
private readonly conversionExit;
|
|
99
|
+
constructor(qualifiedName?: string, conversionExit?: string);
|
|
99
100
|
/** fully qualified symbolic name of the type */
|
|
100
101
|
getQualifiedName(): string | undefined;
|
|
102
|
+
getConversionExit(): string | undefined;
|
|
101
103
|
abstract toText(level: number): string;
|
|
102
104
|
abstract toABAP(): string;
|
|
103
105
|
abstract toCDS(): string;
|
|
@@ -757,7 +759,7 @@ declare class ChapterOfBookStructure extends AbstractObject {
|
|
|
757
759
|
|
|
758
760
|
declare class CharacterType extends AbstractType {
|
|
759
761
|
private readonly length;
|
|
760
|
-
constructor(length: number, qualifiedName?: string);
|
|
762
|
+
constructor(length: number, qualifiedName?: string, conversionExit?: string);
|
|
761
763
|
cloneType(qualifiedName?: string): CharacterType;
|
|
762
764
|
getLength(): number;
|
|
763
765
|
toText(): string;
|
|
@@ -809,7 +811,9 @@ declare class Class extends ABAPObject {
|
|
|
809
811
|
|
|
810
812
|
declare class ClassAttribute extends TypedIdentifier {
|
|
811
813
|
private readonly visibility;
|
|
812
|
-
constructor(id: TypedIdentifier, visibility: Visibility, meta: readonly IdentifierMeta[]
|
|
814
|
+
constructor(id: TypedIdentifier, visibility: Visibility, meta: readonly IdentifierMeta[], value?: string | {
|
|
815
|
+
[index: string]: string;
|
|
816
|
+
});
|
|
813
817
|
getVisibility(): Visibility;
|
|
814
818
|
}
|
|
815
819
|
|
|
@@ -1410,7 +1414,7 @@ declare class DDIC {
|
|
|
1410
1414
|
lookupTable(name: string | undefined): AbstractType;
|
|
1411
1415
|
private lookupView;
|
|
1412
1416
|
lookupTableType(name: string | undefined): ILookupResult;
|
|
1413
|
-
textToType(text: string | undefined, length: string | undefined, decimals: string | undefined, parent: string, qualify?: boolean): AbstractType;
|
|
1417
|
+
textToType(text: string | undefined, length: string | undefined, decimals: string | undefined, parent: string, qualify?: boolean, conversionExit?: string | undefined): AbstractType;
|
|
1414
1418
|
}
|
|
1415
1419
|
|
|
1416
1420
|
declare enum DDLKind {
|
|
@@ -182,7 +182,7 @@ class BuiltIn {
|
|
|
182
182
|
components.push({ name: "host", type: new basic_1.CharacterType(32, "sy-host") });
|
|
183
183
|
components.push({ name: "index", type: new basic_1.IntegerType() });
|
|
184
184
|
components.push({ name: "input", type: new basic_1.CharacterType(1, "sy-input") });
|
|
185
|
-
components.push({ name: "langu", type: new basic_1.CharacterType(1, "sy-langu") });
|
|
185
|
+
components.push({ name: "langu", type: new basic_1.CharacterType(1, "sy-langu", "ISOLA") });
|
|
186
186
|
components.push({ name: "ldbpg", type: new basic_1.CharacterType(40, "sy-ldbpg") });
|
|
187
187
|
components.push({ name: "lilli", type: new basic_1.IntegerType() });
|
|
188
188
|
components.push({ name: "linct", type: new basic_1.IntegerType() });
|
|
@@ -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);
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AbstractType = void 0;
|
|
4
4
|
class AbstractType {
|
|
5
|
-
constructor(qualifiedName) {
|
|
5
|
+
constructor(qualifiedName, conversionExit) {
|
|
6
6
|
this.qualifiedName = qualifiedName;
|
|
7
|
+
this.conversionExit = conversionExit;
|
|
7
8
|
}
|
|
8
9
|
/** fully qualified symbolic name of the type */
|
|
9
10
|
getQualifiedName() {
|
|
10
11
|
return this.qualifiedName;
|
|
11
12
|
}
|
|
13
|
+
getConversionExit() {
|
|
14
|
+
return this.conversionExit;
|
|
15
|
+
}
|
|
12
16
|
}
|
|
13
17
|
exports.AbstractType = AbstractType;
|
|
14
18
|
//# sourceMappingURL=_abstract_type.js.map
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CharacterType = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class CharacterType extends _abstract_type_1.AbstractType {
|
|
6
|
-
constructor(length, qualifiedName) {
|
|
7
|
-
super(qualifiedName);
|
|
6
|
+
constructor(length, qualifiedName, conversionExit) {
|
|
7
|
+
super(qualifiedName, conversionExit);
|
|
8
8
|
if (length <= 0) {
|
|
9
9
|
throw new Error("Bad LENGTH");
|
|
10
10
|
}
|
|
@@ -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/ddic.js
CHANGED
|
@@ -297,7 +297,7 @@ class DDIC {
|
|
|
297
297
|
return { type: new Types.VoidType(name) };
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
textToType(text, length, decimals, parent, qualify = true) {
|
|
300
|
+
textToType(text, length, decimals, parent, qualify = true, conversionExit) {
|
|
301
301
|
// todo, support short strings, and length of different integers, NUMC vs CHAR, min/max length
|
|
302
302
|
const qualified = qualify ? parent : undefined;
|
|
303
303
|
switch (text) {
|
|
@@ -316,17 +316,17 @@ class DDIC {
|
|
|
316
316
|
}
|
|
317
317
|
return new Types.PackedType(parseInt(length, 10), parseInt(decimals, 10), qualified);
|
|
318
318
|
case "ACCP":
|
|
319
|
-
return new Types.CharacterType(6, qualified); // YYYYMM
|
|
319
|
+
return new Types.CharacterType(6, qualified, conversionExit); // YYYYMM
|
|
320
320
|
case "LANG":
|
|
321
|
-
return new Types.CharacterType(1, qualified);
|
|
321
|
+
return new Types.CharacterType(1, qualified, conversionExit);
|
|
322
322
|
case "CLNT":
|
|
323
|
-
return new Types.CharacterType(3, qualified);
|
|
323
|
+
return new Types.CharacterType(3, qualified, conversionExit);
|
|
324
324
|
case "CUKY":
|
|
325
|
-
return new Types.CharacterType(5, qualified);
|
|
325
|
+
return new Types.CharacterType(5, qualified, conversionExit);
|
|
326
326
|
case "UNIT": // 2 <= len <= 3
|
|
327
|
-
return new Types.CharacterType(3, qualified);
|
|
327
|
+
return new Types.CharacterType(3, qualified, conversionExit);
|
|
328
328
|
case "UTCLONG":
|
|
329
|
-
return new Types.CharacterType(27, qualified);
|
|
329
|
+
return new Types.CharacterType(27, qualified, conversionExit);
|
|
330
330
|
case "NUMC": // 1 <= len <= 255
|
|
331
331
|
if (length === undefined) {
|
|
332
332
|
return new Types.UnknownType(text + " unknown length", parent);
|
|
@@ -337,7 +337,7 @@ class DDIC {
|
|
|
337
337
|
if (length === undefined) {
|
|
338
338
|
return new Types.UnknownType(text + " unknown length", parent);
|
|
339
339
|
}
|
|
340
|
-
return new Types.CharacterType(parseInt(length, 10), qualified);
|
|
340
|
+
return new Types.CharacterType(parseInt(length, 10), qualified, conversionExit);
|
|
341
341
|
case "RAW": // 1 <= len <= 32000
|
|
342
342
|
case "LRAW": // 256 <= len <= 32000
|
|
343
343
|
if (length === undefined) {
|
package/build/src/lsp/_lookup.js
CHANGED
|
@@ -101,19 +101,22 @@ class LSPLookup {
|
|
|
101
101
|
static dumpType(variable) {
|
|
102
102
|
let value = variable.toText() + "\n\nType: " + variable.getType().toText(0);
|
|
103
103
|
if (variable.getValue()) {
|
|
104
|
-
value
|
|
104
|
+
value += "\n\nValue: ```" + variable.getValue() + "```";
|
|
105
105
|
}
|
|
106
106
|
if (variable.getMeta().length > 0) {
|
|
107
|
-
value
|
|
107
|
+
value += "\n\nMeta: " + variable.getMeta().join(", ");
|
|
108
108
|
}
|
|
109
109
|
if (variable.getType().containsVoid() === true) {
|
|
110
|
-
value
|
|
110
|
+
value += "\n\nContains Void types";
|
|
111
111
|
}
|
|
112
112
|
if (variable.getType().getQualifiedName()) {
|
|
113
|
-
value
|
|
113
|
+
value += "\n\nQualified Type Name: ```" + variable.getType().getQualifiedName() + "```";
|
|
114
114
|
}
|
|
115
115
|
if (variable.getType().isGeneric() === true) {
|
|
116
|
-
value
|
|
116
|
+
value += "\n\nIs Generic Type";
|
|
117
|
+
}
|
|
118
|
+
if (variable.getType().getConversionExit() !== undefined) {
|
|
119
|
+
value += "\n\nConversion Exit: ```" + variable.getType().getConversionExit() + "```";
|
|
117
120
|
}
|
|
118
121
|
return value;
|
|
119
122
|
}
|
|
@@ -36,7 +36,7 @@ class Domain extends _abstract_object_1.AbstractObject {
|
|
|
36
36
|
return new Types.UnknownType("Domain " + this.getName() + " parser error", this.getName());
|
|
37
37
|
}
|
|
38
38
|
const ddic = new ddic_1.DDIC(reg);
|
|
39
|
-
this.parsedType = ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, parent || this.getName(), parent !== undefined);
|
|
39
|
+
this.parsedType = ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, parent || this.getName(), parent !== undefined, this.parsedXML.conversionExit);
|
|
40
40
|
return this.parsedType;
|
|
41
41
|
}
|
|
42
42
|
parse() {
|
package/build/src/registry.js
CHANGED