@abaplint/core 2.93.94 → 2.93.96
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 +16 -9
- package/build/src/abap/5_syntax/_builtin.js +56 -56
- package/build/src/abap/5_syntax/basic_types.js +1 -1
- package/build/src/abap/5_syntax/expressions/constant.js +2 -2
- package/build/src/abap/5_syntax/expressions/source.js +1 -1
- package/build/src/abap/5_syntax/expressions/string_template.js +1 -1
- package/build/src/abap/5_syntax/structures/type_enum.js +1 -1
- package/build/src/abap/types/basic/_abstract_type.js +13 -5
- package/build/src/abap/types/basic/character_type.js +5 -3
- package/build/src/abap/types/basic/data_reference_type.js +1 -1
- package/build/src/abap/types/basic/floating_point_type.js +1 -1
- package/build/src/abap/types/basic/hex_type.js +1 -1
- package/build/src/abap/types/basic/numeric_type.js +2 -2
- package/build/src/abap/types/basic/object_reference_type.js +1 -1
- package/build/src/abap/types/basic/packed_type.js +2 -2
- package/build/src/abap/types/basic/structure_type.js +1 -1
- package/build/src/abap/types/basic/table_type.js +1 -1
- package/build/src/abap/types/basic/unknown_type.js +1 -1
- package/build/src/abap/types/basic/void_type.js +1 -1
- package/build/src/ddic.js +50 -51
- package/build/src/lsp/_lookup.js +3 -0
- package/build/src/objects/data_element.js +1 -1
- package/build/src/objects/domain.js +2 -2
- package/build/src/objects/table_type.js +1 -1
- package/build/src/registry.js +1 -1
- package/package.json +2 -2
package/build/abaplint.d.ts
CHANGED
|
@@ -94,12 +94,13 @@ declare abstract class AbstractObject implements IObject {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export declare abstract class AbstractType {
|
|
97
|
-
private readonly
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
private readonly data;
|
|
98
|
+
constructor(input?: AbstractTypeData);
|
|
99
|
+
getAbstractTypeData(): AbstractTypeData | undefined;
|
|
100
100
|
/** fully qualified symbolic name of the type */
|
|
101
101
|
getQualifiedName(): string | undefined;
|
|
102
102
|
getConversionExit(): string | undefined;
|
|
103
|
+
getDDICName(): string | undefined;
|
|
103
104
|
abstract toText(level: number): string;
|
|
104
105
|
abstract toABAP(): string;
|
|
105
106
|
abstract toCDS(): string;
|
|
@@ -107,6 +108,12 @@ export declare abstract class AbstractType {
|
|
|
107
108
|
abstract containsVoid(): boolean;
|
|
108
109
|
}
|
|
109
110
|
|
|
111
|
+
declare type AbstractTypeData = {
|
|
112
|
+
qualifiedName?: string;
|
|
113
|
+
conversionExit?: string;
|
|
114
|
+
ddicName?: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
110
117
|
declare class ActivationVariant extends AbstractObject {
|
|
111
118
|
getType(): string;
|
|
112
119
|
getAllowedNaming(): {
|
|
@@ -759,7 +766,7 @@ declare class ChapterOfBookStructure extends AbstractObject {
|
|
|
759
766
|
|
|
760
767
|
declare class CharacterType extends AbstractType {
|
|
761
768
|
private readonly length;
|
|
762
|
-
constructor(length: number,
|
|
769
|
+
constructor(length: number, extra?: AbstractTypeData);
|
|
763
770
|
cloneType(qualifiedName?: string): CharacterType;
|
|
764
771
|
getLength(): number;
|
|
765
772
|
toText(): string;
|
|
@@ -1406,7 +1413,7 @@ declare class DDIC {
|
|
|
1406
1413
|
} | undefined;
|
|
1407
1414
|
/** lookup with voiding and unknown types */
|
|
1408
1415
|
lookup(name: string): ILookupResult;
|
|
1409
|
-
lookupDomain(name: string,
|
|
1416
|
+
lookupDomain(name: string, dataElement?: string): ILookupResult;
|
|
1410
1417
|
lookupDataElement(name: string | undefined): ILookupResult;
|
|
1411
1418
|
lookupTableOrView(name: string | undefined): ILookupResult;
|
|
1412
1419
|
/** this method only looks up the object, does not parse the type */
|
|
@@ -1414,7 +1421,7 @@ declare class DDIC {
|
|
|
1414
1421
|
lookupTable(name: string | undefined): AbstractType;
|
|
1415
1422
|
private lookupView;
|
|
1416
1423
|
lookupTableType(name: string | undefined): ILookupResult;
|
|
1417
|
-
textToType(text: string | undefined, length: string | undefined, decimals: string | undefined,
|
|
1424
|
+
textToType(text: string | undefined, length: string | undefined, decimals: string | undefined, infoText: string, qualifiedName?: string, conversionExit?: string, ddicName?: string): AbstractType;
|
|
1418
1425
|
}
|
|
1419
1426
|
|
|
1420
1427
|
declare enum DDLKind {
|
|
@@ -1564,7 +1571,7 @@ declare class Domain extends AbstractObject {
|
|
|
1564
1571
|
allowNamespace: boolean;
|
|
1565
1572
|
};
|
|
1566
1573
|
setDirty(): void;
|
|
1567
|
-
parseType(reg: IRegistry,
|
|
1574
|
+
parseType(reg: IRegistry, dataElement?: string): AbstractType;
|
|
1568
1575
|
parse(): {
|
|
1569
1576
|
updated: boolean;
|
|
1570
1577
|
runtime: number;
|
|
@@ -4062,7 +4069,7 @@ declare class NumericGenericType extends AbstractType {
|
|
|
4062
4069
|
|
|
4063
4070
|
declare class NumericType extends AbstractType {
|
|
4064
4071
|
private readonly length;
|
|
4065
|
-
constructor(length: number,
|
|
4072
|
+
constructor(length: number, qualifiedName?: string);
|
|
4066
4073
|
getLength(): number;
|
|
4067
4074
|
toText(): string;
|
|
4068
4075
|
toABAP(): string;
|
|
@@ -4269,7 +4276,7 @@ declare class PackageInterface extends AbstractObject {
|
|
|
4269
4276
|
declare class PackedType extends AbstractType {
|
|
4270
4277
|
private readonly length;
|
|
4271
4278
|
private readonly decimals;
|
|
4272
|
-
constructor(length: number, decimals: number,
|
|
4279
|
+
constructor(length: number, decimals: number, extra?: AbstractTypeData);
|
|
4273
4280
|
getLength(): number;
|
|
4274
4281
|
getDecimals(): number;
|
|
4275
4282
|
toText(): string;
|
|
@@ -117,7 +117,7 @@ class BuiltIn {
|
|
|
117
117
|
getTypes() {
|
|
118
118
|
const ret = this.buildSY();
|
|
119
119
|
const id = new tokens_1.Identifier(new position_1.Position(1, 1), "abap_bool");
|
|
120
|
-
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, "ABAP_BOOL")));
|
|
120
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" })));
|
|
121
121
|
return ret;
|
|
122
122
|
}
|
|
123
123
|
get(extras) {
|
|
@@ -133,11 +133,11 @@ class BuiltIn {
|
|
|
133
133
|
ret.push(this.buildConstant("%_MINCHAR"));
|
|
134
134
|
ret.push(this.buildConstant("%_NEWLINE"));
|
|
135
135
|
ret.push(this.buildConstant("%_VERTICAL_TAB"));
|
|
136
|
-
ret.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, "ABAP_BOOL"), "' '"));
|
|
137
|
-
ret.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, "ABAP_BOOL"), "'X'"));
|
|
138
|
-
ret.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, "ABAP_BOOL"), "'-'"));
|
|
139
|
-
ret.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, "ABAP_BOOL"), "' '"));
|
|
140
|
-
ret.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, "ABAP_BOOL"), "'X'"));
|
|
136
|
+
ret.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
|
|
137
|
+
ret.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
|
|
138
|
+
ret.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'"));
|
|
139
|
+
ret.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
|
|
140
|
+
ret.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
|
|
141
141
|
ret.push(this.buildConstant("col_background", new basic_1.IntegerType(), "0"));
|
|
142
142
|
ret.push(this.buildConstant("col_heading", new basic_1.IntegerType(), "1"));
|
|
143
143
|
ret.push(this.buildConstant("col_key", new basic_1.IntegerType(), "4"));
|
|
@@ -156,93 +156,93 @@ class BuiltIn {
|
|
|
156
156
|
/////////////////////////////
|
|
157
157
|
buildSY() {
|
|
158
158
|
const components = [];
|
|
159
|
-
components.push({ name: "abcde", type: new basic_1.CharacterType(26, "sy-abcde") });
|
|
160
|
-
components.push({ name: "batch", type: new basic_1.CharacterType(1, "sy-batch") });
|
|
161
|
-
components.push({ name: "binpt", type: new basic_1.CharacterType(1, "sy-binpt") });
|
|
162
|
-
components.push({ name: "calld", type: new basic_1.CharacterType(1, "sy-calld") });
|
|
163
|
-
components.push({ name: "callr", type: new basic_1.CharacterType(8, "sy-callr") });
|
|
159
|
+
components.push({ name: "abcde", type: new basic_1.CharacterType(26, { qualifiedName: "sy-abcde" }) });
|
|
160
|
+
components.push({ name: "batch", type: new basic_1.CharacterType(1, { qualifiedName: "sy-batch" }) });
|
|
161
|
+
components.push({ name: "binpt", type: new basic_1.CharacterType(1, { qualifiedName: "sy-binpt" }) });
|
|
162
|
+
components.push({ name: "calld", type: new basic_1.CharacterType(1, { qualifiedName: "sy-calld" }) });
|
|
163
|
+
components.push({ name: "callr", type: new basic_1.CharacterType(8, { qualifiedName: "sy-callr" }) });
|
|
164
164
|
components.push({ name: "colno", type: new basic_1.IntegerType() });
|
|
165
165
|
components.push({ name: "cpage", type: new basic_1.IntegerType() });
|
|
166
|
-
components.push({ name: "cprog", type: new basic_1.CharacterType(40, "sy-cprog") });
|
|
166
|
+
components.push({ name: "cprog", type: new basic_1.CharacterType(40, { qualifiedName: "sy-cprog" }) });
|
|
167
167
|
components.push({ name: "cucol", type: new basic_1.IntegerType() });
|
|
168
168
|
components.push({ name: "curow", type: new basic_1.IntegerType() });
|
|
169
|
-
components.push({ name: "datar", type: new basic_1.CharacterType(1, "sy-datar") });
|
|
169
|
+
components.push({ name: "datar", type: new basic_1.CharacterType(1, { qualifiedName: "sy-datar" }) });
|
|
170
170
|
components.push({ name: "datlo", type: new basic_1.DateType() });
|
|
171
171
|
components.push({ name: "datum", type: new basic_1.DateType() });
|
|
172
172
|
components.push({ name: "dayst", type: new basic_1.CharacterType(1) });
|
|
173
173
|
components.push({ name: "dbcnt", type: new basic_1.IntegerType() });
|
|
174
|
-
components.push({ name: "dbnam", type: new basic_1.CharacterType(20, "sy-dbnam") });
|
|
175
|
-
components.push({ name: "dbsys", type: new basic_1.CharacterType(10, "sy-dbsys") });
|
|
176
|
-
components.push({ name: "dyngr", type: new basic_1.CharacterType(4, "sy-dyngr") });
|
|
177
|
-
components.push({ name: "dynnr", type: new basic_1.CharacterType(4, "sy-dynnr") });
|
|
174
|
+
components.push({ name: "dbnam", type: new basic_1.CharacterType(20, { qualifiedName: "sy-dbnam" }) });
|
|
175
|
+
components.push({ name: "dbsys", type: new basic_1.CharacterType(10, { qualifiedName: "sy-dbsys" }) });
|
|
176
|
+
components.push({ name: "dyngr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dyngr" }) });
|
|
177
|
+
components.push({ name: "dynnr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dynnr" }) });
|
|
178
178
|
components.push({ name: "fdayw", type: new basic_1.IntegerType() });
|
|
179
179
|
components.push({ name: "fdpos", type: new basic_1.IntegerType() });
|
|
180
180
|
components.push({ name: "fleng", type: new basic_1.IntegerType() });
|
|
181
181
|
components.push({ name: "folen", type: new basic_1.IntegerType() });
|
|
182
|
-
components.push({ name: "host", type: new basic_1.CharacterType(32, "sy-host") });
|
|
182
|
+
components.push({ name: "host", type: new basic_1.CharacterType(32, { qualifiedName: "sy-host" }) });
|
|
183
183
|
components.push({ name: "index", type: new basic_1.IntegerType() });
|
|
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", "ISOLA") });
|
|
186
|
-
components.push({ name: "ldbpg", type: new basic_1.CharacterType(40, "sy-ldbpg") });
|
|
184
|
+
components.push({ name: "input", type: new basic_1.CharacterType(1, { qualifiedName: "sy-input" }) });
|
|
185
|
+
components.push({ name: "langu", type: new basic_1.CharacterType(1, { qualifiedName: "sy-langu", conversionExit: "ISOLA" }) });
|
|
186
|
+
components.push({ name: "ldbpg", type: new basic_1.CharacterType(40, { qualifiedName: "sy-ldbpg" }) });
|
|
187
187
|
components.push({ name: "lilli", type: new basic_1.IntegerType() });
|
|
188
188
|
components.push({ name: "linct", type: new basic_1.IntegerType() });
|
|
189
189
|
components.push({ name: "linno", type: new basic_1.IntegerType() });
|
|
190
190
|
components.push({ name: "linsz", type: new basic_1.IntegerType() });
|
|
191
|
-
components.push({ name: "lisel", type: new basic_1.CharacterType(255, "sy-lisel") });
|
|
191
|
+
components.push({ name: "lisel", type: new basic_1.CharacterType(255, { qualifiedName: "sy-lisel" }) });
|
|
192
192
|
components.push({ name: "listi", type: new basic_1.IntegerType() });
|
|
193
193
|
components.push({ name: "loopc", type: new basic_1.IntegerType() });
|
|
194
194
|
components.push({ name: "lsind", type: new basic_1.IntegerType() });
|
|
195
195
|
components.push({ name: "macol", type: new basic_1.IntegerType() });
|
|
196
|
-
components.push({ name: "mandt", type: new basic_1.CharacterType(3, "sy-mandt") });
|
|
196
|
+
components.push({ name: "mandt", type: new basic_1.CharacterType(3, { qualifiedName: "sy-mandt" }) });
|
|
197
197
|
components.push({ name: "marow", type: new basic_1.IntegerType() });
|
|
198
198
|
components.push({ name: "modno", type: new basic_1.IntegerType() });
|
|
199
|
-
components.push({ name: "msgid", type: new basic_1.CharacterType(20, "sy-msgid") });
|
|
200
|
-
components.push({ name: "msgli", type: new basic_1.CharacterType(60, "sy-msgli") });
|
|
199
|
+
components.push({ name: "msgid", type: new basic_1.CharacterType(20, { qualifiedName: "sy-msgid" }) });
|
|
200
|
+
components.push({ name: "msgli", type: new basic_1.CharacterType(60, { qualifiedName: "sy-msgli" }) });
|
|
201
201
|
components.push({ name: "msgno", type: new basic_1.NumericType(3, "sy-msgno") });
|
|
202
|
-
components.push({ name: "msgty", type: new basic_1.CharacterType(1, "sy-msgty") });
|
|
203
|
-
components.push({ name: "msgv1", type: new basic_1.CharacterType(50, "sy-msgv1") });
|
|
204
|
-
components.push({ name: "msgv2", type: new basic_1.CharacterType(50, "sy-msgv2") });
|
|
205
|
-
components.push({ name: "msgv3", type: new basic_1.CharacterType(50, "sy-msgv3") });
|
|
206
|
-
components.push({ name: "msgv4", type: new basic_1.CharacterType(50, "sy-msgv4") });
|
|
207
|
-
components.push({ name: "opsys", type: new basic_1.CharacterType(10, "sy-opsys") });
|
|
202
|
+
components.push({ name: "msgty", type: new basic_1.CharacterType(1, { qualifiedName: "sy-msgty" }) });
|
|
203
|
+
components.push({ name: "msgv1", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv1" }) });
|
|
204
|
+
components.push({ name: "msgv2", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv2" }) });
|
|
205
|
+
components.push({ name: "msgv3", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv3" }) });
|
|
206
|
+
components.push({ name: "msgv4", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv4" }) });
|
|
207
|
+
components.push({ name: "opsys", type: new basic_1.CharacterType(10, { qualifiedName: "sy-opsys" }) });
|
|
208
208
|
components.push({ name: "pagno", type: new basic_1.IntegerType() });
|
|
209
|
-
components.push({ name: "pdest", type: new basic_1.CharacterType(4, "sy-pdest") });
|
|
210
|
-
components.push({ name: "pfkey", type: new basic_1.CharacterType(20, "sy-pfkey") });
|
|
211
|
-
components.push({ name: "repid", type: new basic_1.CharacterType(40, "sy-repid") });
|
|
212
|
-
components.push({ name: "saprl", type: new basic_1.CharacterType(4, "sy-saprl") });
|
|
209
|
+
components.push({ name: "pdest", type: new basic_1.CharacterType(4, { qualifiedName: "sy-pdest" }) });
|
|
210
|
+
components.push({ name: "pfkey", type: new basic_1.CharacterType(20, { qualifiedName: "sy-pfkey" }) });
|
|
211
|
+
components.push({ name: "repid", type: new basic_1.CharacterType(40, { qualifiedName: "sy-repid" }) });
|
|
212
|
+
components.push({ name: "saprl", type: new basic_1.CharacterType(4, { qualifiedName: "sy-saprl" }) });
|
|
213
213
|
components.push({ name: "scols", type: new basic_1.IntegerType() });
|
|
214
|
-
components.push({ name: "slset", type: new basic_1.CharacterType(14, "sy-slset") });
|
|
215
|
-
components.push({ name: "spono", type: new basic_1.CharacterType(10, "sy-spono") });
|
|
214
|
+
components.push({ name: "slset", type: new basic_1.CharacterType(14, { qualifiedName: "sy-slset" }) });
|
|
215
|
+
components.push({ name: "spono", type: new basic_1.CharacterType(10, { qualifiedName: "sy-spono" }) });
|
|
216
216
|
components.push({ name: "srows", type: new basic_1.IntegerType() });
|
|
217
217
|
components.push({ name: "staco", type: new basic_1.IntegerType() });
|
|
218
218
|
components.push({ name: "staro", type: new basic_1.IntegerType() });
|
|
219
219
|
components.push({ name: "stepl", type: new basic_1.IntegerType() });
|
|
220
220
|
components.push({ name: "subrc", type: new basic_1.IntegerType() });
|
|
221
|
-
components.push({ name: "sysid", type: new basic_1.CharacterType(3, "sy-sysid") });
|
|
221
|
+
components.push({ name: "sysid", type: new basic_1.CharacterType(3, { qualifiedName: "sy-sysid" }) });
|
|
222
222
|
components.push({ name: "tabix", type: new basic_1.IntegerType() });
|
|
223
|
-
components.push({ name: "tcode", type: new basic_1.CharacterType(20, "sy-tcode") });
|
|
223
|
+
components.push({ name: "tcode", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tcode" }) });
|
|
224
224
|
components.push({ name: "tfill", type: new basic_1.IntegerType() });
|
|
225
225
|
components.push({ name: "timlo", type: new basic_1.TimeType() });
|
|
226
|
-
components.push({ name: "title", type: new basic_1.CharacterType(70, "sy-title") });
|
|
226
|
+
components.push({ name: "title", type: new basic_1.CharacterType(70, { qualifiedName: "sy-title" }) });
|
|
227
227
|
components.push({ name: "tleng", type: new basic_1.IntegerType() });
|
|
228
|
-
components.push({ name: "tvar0", type: new basic_1.CharacterType(20, "sy-tvar0") });
|
|
229
|
-
components.push({ name: "tvar1", type: new basic_1.CharacterType(20, "sy-tvar1") });
|
|
230
|
-
components.push({ name: "tvar2", type: new basic_1.CharacterType(20, "sy-tvar2") });
|
|
231
|
-
components.push({ name: "tvar3", type: new basic_1.CharacterType(20, "sy-tvar3") });
|
|
232
|
-
components.push({ name: "tvar4", type: new basic_1.CharacterType(20, "sy-tvar4") });
|
|
233
|
-
components.push({ name: "tvar5", type: new basic_1.CharacterType(20, "sy-tvar5") });
|
|
234
|
-
components.push({ name: "tvar6", type: new basic_1.CharacterType(20, "sy-tvar6") });
|
|
235
|
-
components.push({ name: "tvar7", type: new basic_1.CharacterType(20, "sy-tvar7") });
|
|
236
|
-
components.push({ name: "tvar8", type: new basic_1.CharacterType(20, "sy-tvar8") });
|
|
237
|
-
components.push({ name: "tvar9", type: new basic_1.CharacterType(20, "sy-tvar9") });
|
|
228
|
+
components.push({ name: "tvar0", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar0" }) });
|
|
229
|
+
components.push({ name: "tvar1", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar1" }) });
|
|
230
|
+
components.push({ name: "tvar2", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar2" }) });
|
|
231
|
+
components.push({ name: "tvar3", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar3" }) });
|
|
232
|
+
components.push({ name: "tvar4", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar4" }) });
|
|
233
|
+
components.push({ name: "tvar5", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar5" }) });
|
|
234
|
+
components.push({ name: "tvar6", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar6" }) });
|
|
235
|
+
components.push({ name: "tvar7", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar7" }) });
|
|
236
|
+
components.push({ name: "tvar8", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar8" }) });
|
|
237
|
+
components.push({ name: "tvar9", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar9" }) });
|
|
238
238
|
components.push({ name: "tzone", type: new basic_1.IntegerType() });
|
|
239
|
-
components.push({ name: "ucomm", type: new basic_1.CharacterType(70, "sy-ucomm") });
|
|
240
|
-
components.push({ name: "uline", type: new basic_1.CharacterType(255, "sy-uline") });
|
|
241
|
-
components.push({ name: "uname", type: new basic_1.CharacterType(12, "sy-uname") });
|
|
239
|
+
components.push({ name: "ucomm", type: new basic_1.CharacterType(70, { qualifiedName: "sy-ucomm" }) });
|
|
240
|
+
components.push({ name: "uline", type: new basic_1.CharacterType(255, { qualifiedName: "sy-uline" }) });
|
|
241
|
+
components.push({ name: "uname", type: new basic_1.CharacterType(12, { qualifiedName: "sy-uname" }) });
|
|
242
242
|
components.push({ name: "uzeit", type: new basic_1.TimeType() });
|
|
243
|
-
components.push({ name: "vline", type: new basic_1.CharacterType(1, "sy-vline") });
|
|
244
|
-
components.push({ name: "wtitl", type: new basic_1.CharacterType(1, "sy-wtitl") });
|
|
245
|
-
components.push({ name: "zonlo", type: new basic_1.CharacterType(6, "sy-zonlo") });
|
|
243
|
+
components.push({ name: "vline", type: new basic_1.CharacterType(1, { qualifiedName: "sy-vline" }) });
|
|
244
|
+
components.push({ name: "wtitl", type: new basic_1.CharacterType(1, { qualifiedName: "sy-wtitl" }) });
|
|
245
|
+
components.push({ name: "zonlo", type: new basic_1.CharacterType(6, { qualifiedName: "sy-zonlo" }) });
|
|
246
246
|
const type = new basic_1.StructureType(components);
|
|
247
247
|
const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy");
|
|
248
248
|
const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
@@ -514,7 +514,7 @@ class BasicTypes {
|
|
|
514
514
|
length = parseInt(int.concatTokens(), 10);
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
found = new Types.CharacterType(length, qualifiedName); // fallback
|
|
517
|
+
found = new Types.CharacterType(length, { qualifiedName: qualifiedName }); // fallback
|
|
518
518
|
if (this.isOccurs(node)) {
|
|
519
519
|
found = new Types.TableType(found, { withHeader: concat.includes(" WITH HEADER LINE") }, qualifiedName);
|
|
520
520
|
}
|
|
@@ -6,7 +6,7 @@ const expressions_1 = require("../../2_statements/expressions");
|
|
|
6
6
|
class Constant {
|
|
7
7
|
runSyntax(node) {
|
|
8
8
|
if (node.findDirectExpression(expressions_1.Integer)) {
|
|
9
|
-
return new basic_1.IntegerType("I");
|
|
9
|
+
return new basic_1.IntegerType({ qualifiedName: "I" });
|
|
10
10
|
}
|
|
11
11
|
else if (node.getFirstToken().getStr().startsWith("'")) {
|
|
12
12
|
let len = node.getFirstToken().getStr().length - 2;
|
|
@@ -16,7 +16,7 @@ class Constant {
|
|
|
16
16
|
return new basic_1.CharacterType(len);
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
|
-
return new basic_1.StringType("STRING");
|
|
19
|
+
return new basic_1.StringType({ qualifiedName: "STRING" });
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -59,7 +59,7 @@ class Source {
|
|
|
59
59
|
const method = new _builtin_1.BuiltIn().searchBuiltin(tok);
|
|
60
60
|
scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, filename);
|
|
61
61
|
new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), scope, filename);
|
|
62
|
-
return new basic_1.CharacterType(1, "ABAP_BOOL");
|
|
62
|
+
return new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" });
|
|
63
63
|
}
|
|
64
64
|
case "REDUCE":
|
|
65
65
|
{
|
|
@@ -7,7 +7,7 @@ const source_1 = require("./source");
|
|
|
7
7
|
class StringTemplate {
|
|
8
8
|
runSyntax(node, scope, filename) {
|
|
9
9
|
for (const s of node.findAllExpressions(Expressions.Source)) {
|
|
10
|
-
new source_1.Source().runSyntax(s, scope, filename, new basic_1.StringType("STRING"));
|
|
10
|
+
new source_1.Source().runSyntax(s, scope, filename, new basic_1.StringType({ qualifiedName: "STRING" }));
|
|
11
11
|
}
|
|
12
12
|
return new basic_1.StringType();
|
|
13
13
|
}
|
|
@@ -54,7 +54,7 @@ class TypeEnum {
|
|
|
54
54
|
|| scope.getType() === _scope_type_1.ScopeType.Interface) {
|
|
55
55
|
qualifiedName = scope.getName() + "=>" + qualifiedName;
|
|
56
56
|
}
|
|
57
|
-
const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType(qualifiedName), ["enum" /* IdentifierMeta.Enum */]);
|
|
57
|
+
const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType({ qualifiedName: qualifiedName }), ["enum" /* IdentifierMeta.Enum */]);
|
|
58
58
|
scope.addType(id);
|
|
59
59
|
types.push(id);
|
|
60
60
|
}
|
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AbstractType = void 0;
|
|
4
4
|
class AbstractType {
|
|
5
|
-
constructor(
|
|
6
|
-
this.
|
|
7
|
-
|
|
5
|
+
constructor(input) {
|
|
6
|
+
this.data = input;
|
|
7
|
+
}
|
|
8
|
+
getAbstractTypeData() {
|
|
9
|
+
return this.data;
|
|
8
10
|
}
|
|
9
11
|
/** fully qualified symbolic name of the type */
|
|
10
12
|
getQualifiedName() {
|
|
11
|
-
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = this.data) === null || _a === void 0 ? void 0 : _a.qualifiedName;
|
|
12
15
|
}
|
|
13
16
|
getConversionExit() {
|
|
14
|
-
|
|
17
|
+
var _a;
|
|
18
|
+
return (_a = this.data) === null || _a === void 0 ? void 0 : _a.conversionExit;
|
|
19
|
+
}
|
|
20
|
+
getDDICName() {
|
|
21
|
+
var _a;
|
|
22
|
+
return (_a = this.data) === null || _a === void 0 ? void 0 : _a.ddicName;
|
|
15
23
|
}
|
|
16
24
|
}
|
|
17
25
|
exports.AbstractType = AbstractType;
|
|
@@ -3,15 +3,17 @@ 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,
|
|
7
|
-
super(
|
|
6
|
+
constructor(length, extra) {
|
|
7
|
+
super(extra);
|
|
8
8
|
if (length <= 0) {
|
|
9
9
|
throw new Error("Bad LENGTH");
|
|
10
10
|
}
|
|
11
11
|
this.length = length;
|
|
12
12
|
}
|
|
13
13
|
cloneType(qualifiedName) {
|
|
14
|
-
|
|
14
|
+
const clone = Object.assign({}, this.getAbstractTypeData()) || {};
|
|
15
|
+
clone.qualifiedName = qualifiedName;
|
|
16
|
+
return new CharacterType(this.length, clone);
|
|
15
17
|
}
|
|
16
18
|
getLength() {
|
|
17
19
|
return this.length;
|
|
@@ -4,7 +4,7 @@ exports.DataReference = void 0;
|
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class DataReference extends _abstract_type_1.AbstractType {
|
|
6
6
|
constructor(type, qualifiedName) {
|
|
7
|
-
super(qualifiedName);
|
|
7
|
+
super({ qualifiedName: qualifiedName });
|
|
8
8
|
this.type = type;
|
|
9
9
|
}
|
|
10
10
|
toText(level) {
|
|
@@ -5,7 +5,7 @@ const _abstract_type_1 = require("./_abstract_type");
|
|
|
5
5
|
// this is the DDIC floating point type
|
|
6
6
|
class FloatingPointType extends _abstract_type_1.AbstractType {
|
|
7
7
|
constructor(length, qualifiedName) {
|
|
8
|
-
super(qualifiedName);
|
|
8
|
+
super({ qualifiedName: qualifiedName });
|
|
9
9
|
if (length <= 0) {
|
|
10
10
|
throw new Error("Bad LENGTH");
|
|
11
11
|
}
|
|
@@ -4,7 +4,7 @@ exports.HexType = void 0;
|
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class HexType extends _abstract_type_1.AbstractType {
|
|
6
6
|
constructor(length, qualifiedName) {
|
|
7
|
-
super(qualifiedName);
|
|
7
|
+
super({ qualifiedName: qualifiedName });
|
|
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.NumericType = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class NumericType extends _abstract_type_1.AbstractType {
|
|
6
|
-
constructor(length,
|
|
7
|
-
super(
|
|
6
|
+
constructor(length, qualifiedName) {
|
|
7
|
+
super({ qualifiedName: qualifiedName });
|
|
8
8
|
if (length <= 0) {
|
|
9
9
|
throw new Error("Bad LENGTH");
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ const _abstract_type_1 = require("./_abstract_type");
|
|
|
5
5
|
// use GenericObjectReferenceType for REF TO OBJECT
|
|
6
6
|
class ObjectReferenceType extends _abstract_type_1.AbstractType {
|
|
7
7
|
constructor(id, qualifiedName) {
|
|
8
|
-
super(qualifiedName);
|
|
8
|
+
super({ qualifiedName: qualifiedName });
|
|
9
9
|
this.identifier = id;
|
|
10
10
|
}
|
|
11
11
|
getIdentifierName() {
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PackedType = void 0;
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class PackedType extends _abstract_type_1.AbstractType {
|
|
6
|
-
constructor(length, decimals,
|
|
7
|
-
super(
|
|
6
|
+
constructor(length, decimals, extra) {
|
|
7
|
+
super(extra);
|
|
8
8
|
if (length <= 0) {
|
|
9
9
|
throw new Error("Bad LENGTH");
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ exports.StructureType = void 0;
|
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class StructureType extends _abstract_type_1.AbstractType {
|
|
6
6
|
constructor(components, qualifiedName) {
|
|
7
|
-
super(qualifiedName);
|
|
7
|
+
super({ qualifiedName: qualifiedName });
|
|
8
8
|
if (components.length === 0) {
|
|
9
9
|
throw new Error("Structure does not contain any components");
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@ var TableAccessType;
|
|
|
12
12
|
})(TableAccessType = exports.TableAccessType || (exports.TableAccessType = {}));
|
|
13
13
|
class TableType extends _abstract_type_1.AbstractType {
|
|
14
14
|
constructor(rowType, options, qualifiedName) {
|
|
15
|
-
super(qualifiedName);
|
|
15
|
+
super({ qualifiedName: qualifiedName });
|
|
16
16
|
this.rowType = rowType;
|
|
17
17
|
this.options = options;
|
|
18
18
|
}
|
|
@@ -4,7 +4,7 @@ exports.UnknownType = void 0;
|
|
|
4
4
|
const _abstract_type_1 = require("./_abstract_type");
|
|
5
5
|
class UnknownType extends _abstract_type_1.AbstractType {
|
|
6
6
|
constructor(error, qualifiedName) {
|
|
7
|
-
super(qualifiedName);
|
|
7
|
+
super({ qualifiedName: qualifiedName });
|
|
8
8
|
this.error = error;
|
|
9
9
|
}
|
|
10
10
|
getError() {
|
package/build/src/ddic.js
CHANGED
|
@@ -46,60 +46,60 @@ class DDIC {
|
|
|
46
46
|
lookupBuiltinType(name, length, decimals, qualifiedName) {
|
|
47
47
|
switch (name) {
|
|
48
48
|
case "STRING":
|
|
49
|
-
return new Types.StringType(qualifiedName || name);
|
|
49
|
+
return new Types.StringType({ qualifiedName: qualifiedName || name });
|
|
50
50
|
case "XSTRING":
|
|
51
|
-
return new Types.XStringType(qualifiedName || name);
|
|
51
|
+
return new Types.XStringType({ qualifiedName: qualifiedName || name });
|
|
52
52
|
case "D":
|
|
53
|
-
return new Types.DateType(qualifiedName || name);
|
|
53
|
+
return new Types.DateType({ qualifiedName: qualifiedName || name });
|
|
54
54
|
case "T":
|
|
55
|
-
return new Types.TimeType(qualifiedName || name);
|
|
55
|
+
return new Types.TimeType({ qualifiedName: qualifiedName || name });
|
|
56
56
|
case "XSEQUENCE":
|
|
57
|
-
return new Types.XSequenceType(qualifiedName);
|
|
57
|
+
return new Types.XSequenceType({ qualifiedName: qualifiedName });
|
|
58
58
|
case "CLIKE":
|
|
59
|
-
return new Types.CLikeType(qualifiedName);
|
|
59
|
+
return new Types.CLikeType({ qualifiedName: qualifiedName });
|
|
60
60
|
case "DECFLOAT":
|
|
61
|
-
return new Types.DecFloatType(qualifiedName);
|
|
61
|
+
return new Types.DecFloatType({ qualifiedName: qualifiedName });
|
|
62
62
|
case "ANY":
|
|
63
|
-
return new Types.AnyType(qualifiedName);
|
|
63
|
+
return new Types.AnyType({ qualifiedName: qualifiedName });
|
|
64
64
|
case "SIMPLE":
|
|
65
|
-
return new Types.SimpleType(qualifiedName);
|
|
65
|
+
return new Types.SimpleType({ qualifiedName: qualifiedName });
|
|
66
66
|
case "%_C_POINTER":
|
|
67
67
|
return new Types.HexType(8, qualifiedName);
|
|
68
68
|
case "TABLE":
|
|
69
69
|
return new Types.TableType(new Types.AnyType(), { withHeader: false });
|
|
70
70
|
case "DATA":
|
|
71
|
-
return new Types.AnyType(qualifiedName);
|
|
71
|
+
return new Types.AnyType({ qualifiedName: qualifiedName });
|
|
72
72
|
case "NUMERIC":
|
|
73
|
-
return new Types.NumericGenericType(qualifiedName);
|
|
73
|
+
return new Types.NumericGenericType({ qualifiedName: qualifiedName });
|
|
74
74
|
case "UTCLONG": // todo, take version into account
|
|
75
|
-
return new Types.UTCLongType(qualifiedName);
|
|
75
|
+
return new Types.UTCLongType({ qualifiedName: qualifiedName });
|
|
76
76
|
case "DECFLOAT16":
|
|
77
|
-
return new Types.DecFloat16Type(qualifiedName);
|
|
77
|
+
return new Types.DecFloat16Type({ qualifiedName: qualifiedName });
|
|
78
78
|
case "DECFLOAT34":
|
|
79
|
-
return new Types.DecFloat34Type(qualifiedName);
|
|
79
|
+
return new Types.DecFloat34Type({ qualifiedName: qualifiedName });
|
|
80
80
|
case "CSEQUENCE":
|
|
81
|
-
return new Types.CSequenceType(qualifiedName);
|
|
81
|
+
return new Types.CSequenceType({ qualifiedName: qualifiedName });
|
|
82
82
|
case "I":
|
|
83
83
|
case "INT8": // todo, take version into account
|
|
84
|
-
return new Types.IntegerType(qualifiedName || name);
|
|
84
|
+
return new Types.IntegerType({ qualifiedName: qualifiedName || name });
|
|
85
85
|
case "F":
|
|
86
|
-
return new Types.FloatType(qualifiedName || name);
|
|
86
|
+
return new Types.FloatType({ qualifiedName: qualifiedName || name });
|
|
87
87
|
case "P":
|
|
88
88
|
if (length && decimals) {
|
|
89
|
-
return new Types.PackedType(length, decimals, qualifiedName);
|
|
89
|
+
return new Types.PackedType(length, decimals, { qualifiedName: qualifiedName });
|
|
90
90
|
}
|
|
91
91
|
else if (length) {
|
|
92
|
-
return new Types.PackedType(length, 0, qualifiedName);
|
|
92
|
+
return new Types.PackedType(length, 0, { qualifiedName: qualifiedName });
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
|
-
return new Types.PackedType(1, 0, qualifiedName);
|
|
95
|
+
return new Types.PackedType(1, 0, { qualifiedName: qualifiedName });
|
|
96
96
|
}
|
|
97
97
|
case "C":
|
|
98
98
|
if (length) {
|
|
99
|
-
return new Types.CharacterType(length, qualifiedName);
|
|
99
|
+
return new Types.CharacterType(length, { qualifiedName: qualifiedName });
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
102
|
-
return new Types.CharacterType(1, qualifiedName);
|
|
102
|
+
return new Types.CharacterType(1, { qualifiedName: qualifiedName });
|
|
103
103
|
}
|
|
104
104
|
case "X":
|
|
105
105
|
if (length) {
|
|
@@ -192,10 +192,10 @@ class DDIC {
|
|
|
192
192
|
return { type: new Types.VoidType(name) };
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
lookupDomain(name,
|
|
195
|
+
lookupDomain(name, dataElement) {
|
|
196
196
|
const found = this.reg.getObject("DOMA", name);
|
|
197
197
|
if (found) {
|
|
198
|
-
return { type: found.parseType(this.reg,
|
|
198
|
+
return { type: found.parseType(this.reg, dataElement), object: found };
|
|
199
199
|
}
|
|
200
200
|
else if (this.reg.inErrorNamespace(name)) {
|
|
201
201
|
return { type: new Types.UnknownType(name + ", lookupDomain"), object: undefined };
|
|
@@ -297,9 +297,8 @@ class DDIC {
|
|
|
297
297
|
return { type: new Types.VoidType(name) };
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
textToType(text, length, decimals,
|
|
301
|
-
// todo
|
|
302
|
-
const qualified = qualify ? parent : undefined;
|
|
300
|
+
textToType(text, length, decimals, infoText, qualifiedName, conversionExit, ddicName) {
|
|
301
|
+
// todo: support short strings, and length of different integers, NUMC vs CHAR, min/max length
|
|
303
302
|
switch (text) {
|
|
304
303
|
case "DEC": // 1 <= len <= 31
|
|
305
304
|
case "D16F": // 1 <= len <= 31
|
|
@@ -309,44 +308,44 @@ class DDIC {
|
|
|
309
308
|
case "CURR": // 1 <= len <= 31
|
|
310
309
|
case "QUAN": // 1 <= len <= 31
|
|
311
310
|
if (length === undefined) {
|
|
312
|
-
return new Types.UnknownType(text + " unknown length, " +
|
|
311
|
+
return new Types.UnknownType(text + " unknown length, " + infoText, infoText);
|
|
313
312
|
}
|
|
314
313
|
else if (decimals === undefined) {
|
|
315
|
-
return new Types.PackedType(parseInt(length, 10), 0,
|
|
314
|
+
return new Types.PackedType(parseInt(length, 10), 0, { qualifiedName, conversionExit, ddicName });
|
|
316
315
|
}
|
|
317
|
-
return new Types.PackedType(parseInt(length, 10), parseInt(decimals, 10),
|
|
316
|
+
return new Types.PackedType(parseInt(length, 10), parseInt(decimals, 10), { qualifiedName, conversionExit, ddicName });
|
|
318
317
|
case "ACCP":
|
|
319
|
-
return new Types.CharacterType(6,
|
|
318
|
+
return new Types.CharacterType(6, { qualifiedName, conversionExit, ddicName }); // YYYYMM
|
|
320
319
|
case "LANG":
|
|
321
|
-
return new Types.CharacterType(1,
|
|
320
|
+
return new Types.CharacterType(1, { qualifiedName, conversionExit, ddicName });
|
|
322
321
|
case "CLNT":
|
|
323
|
-
return new Types.CharacterType(3,
|
|
322
|
+
return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });
|
|
324
323
|
case "CUKY":
|
|
325
|
-
return new Types.CharacterType(5,
|
|
324
|
+
return new Types.CharacterType(5, { qualifiedName, conversionExit, ddicName });
|
|
326
325
|
case "UNIT": // 2 <= len <= 3
|
|
327
|
-
return new Types.CharacterType(3,
|
|
326
|
+
return new Types.CharacterType(3, { qualifiedName, conversionExit, ddicName });
|
|
328
327
|
case "UTCLONG":
|
|
329
|
-
return new Types.CharacterType(27,
|
|
328
|
+
return new Types.CharacterType(27, { qualifiedName, conversionExit, ddicName });
|
|
330
329
|
case "NUMC": // 1 <= len <= 255
|
|
331
330
|
if (length === undefined) {
|
|
332
|
-
return new Types.UnknownType(text + " unknown length",
|
|
331
|
+
return new Types.UnknownType(text + " unknown length", infoText);
|
|
333
332
|
}
|
|
334
|
-
return new Types.NumericType(parseInt(length, 10),
|
|
333
|
+
return new Types.NumericType(parseInt(length, 10), qualifiedName);
|
|
335
334
|
case "CHAR": // 1 <= len <= 30000 (1333 for table fields)
|
|
336
335
|
case "LCHR": // 256 <= len <= 32000
|
|
337
336
|
if (length === undefined) {
|
|
338
|
-
return new Types.UnknownType(text + " unknown length",
|
|
337
|
+
return new Types.UnknownType(text + " unknown length", infoText);
|
|
339
338
|
}
|
|
340
|
-
return new Types.CharacterType(parseInt(length, 10),
|
|
339
|
+
return new Types.CharacterType(parseInt(length, 10), { qualifiedName, conversionExit, ddicName });
|
|
341
340
|
case "RAW": // 1 <= len <= 32000
|
|
342
341
|
case "LRAW": // 256 <= len <= 32000
|
|
343
342
|
if (length === undefined) {
|
|
344
|
-
return new Types.UnknownType(text + " unknown length",
|
|
343
|
+
return new Types.UnknownType(text + " unknown length", infoText);
|
|
345
344
|
}
|
|
346
|
-
return new Types.HexType(parseInt(length, 10),
|
|
345
|
+
return new Types.HexType(parseInt(length, 10), qualifiedName);
|
|
347
346
|
case "TIMN": // Native HANA
|
|
348
347
|
case "TIMS":
|
|
349
|
-
return new Types.TimeType(
|
|
348
|
+
return new Types.TimeType({ qualifiedName: qualifiedName }); //HHMMSS
|
|
350
349
|
case "DECFLOAT16": // len = 16
|
|
351
350
|
case "DECFLOAT34": // len = 34
|
|
352
351
|
case "D16R": // len = 16
|
|
@@ -355,35 +354,35 @@ class DDIC {
|
|
|
355
354
|
case "DF34_RAW": // len = 34
|
|
356
355
|
case "FLTP": // len = 16
|
|
357
356
|
if (length === undefined) {
|
|
358
|
-
return new Types.UnknownType(text + " unknown length",
|
|
357
|
+
return new Types.UnknownType(text + " unknown length", infoText);
|
|
359
358
|
}
|
|
360
|
-
return new Types.FloatingPointType(parseInt(length, 10),
|
|
359
|
+
return new Types.FloatingPointType(parseInt(length, 10), qualifiedName);
|
|
361
360
|
case "DATN": // Native HANA
|
|
362
361
|
case "DATS":
|
|
363
|
-
return new Types.DateType(
|
|
362
|
+
return new Types.DateType({ qualifiedName: qualifiedName }); //YYYYMMDD
|
|
364
363
|
case "INT1":
|
|
365
364
|
case "INT2":
|
|
366
365
|
case "INT4":
|
|
367
366
|
case "INT8":
|
|
368
|
-
return new Types.IntegerType(
|
|
367
|
+
return new Types.IntegerType({ qualifiedName: qualifiedName });
|
|
369
368
|
case "SSTR": // 1 <= len <= 1333
|
|
370
369
|
case "SSTRING": // 1 <= len <= 1333
|
|
371
370
|
case "STRG": // 256 <= len
|
|
372
371
|
case "STRING": // 256 <= len
|
|
373
|
-
return new Types.StringType(
|
|
372
|
+
return new Types.StringType({ qualifiedName: qualifiedName });
|
|
374
373
|
case "RSTR": // 256 <= len
|
|
375
374
|
case "RAWSTRING": // 256 <= len
|
|
376
375
|
case "GEOM_EWKB":
|
|
377
|
-
return new Types.XStringType(
|
|
376
|
+
return new Types.XStringType({ qualifiedName: qualifiedName });
|
|
378
377
|
case "D16S":
|
|
379
378
|
case "D34S":
|
|
380
379
|
case "DF16_SCL":
|
|
381
380
|
case "DF34_SCL":
|
|
382
381
|
case "PREC":
|
|
383
382
|
case "VARC":
|
|
384
|
-
return new Types.UnknownType(text + " is an obsolete data type",
|
|
383
|
+
return new Types.UnknownType(text + " is an obsolete data type", infoText);
|
|
385
384
|
default:
|
|
386
|
-
return new Types.UnknownType(text + " unknown",
|
|
385
|
+
return new Types.UnknownType(text + " unknown", infoText);
|
|
387
386
|
}
|
|
388
387
|
}
|
|
389
388
|
}
|
package/build/src/lsp/_lookup.js
CHANGED
|
@@ -118,6 +118,9 @@ class LSPLookup {
|
|
|
118
118
|
if (variable.getType().getConversionExit() !== undefined) {
|
|
119
119
|
value += "\n\nConversion Exit: ```" + variable.getType().getConversionExit() + "```";
|
|
120
120
|
}
|
|
121
|
+
if (variable.getType().getDDICName() !== undefined) {
|
|
122
|
+
value += "\n\nDDIC Name: ```" + variable.getType().getDDICName() + "```";
|
|
123
|
+
}
|
|
121
124
|
return value;
|
|
122
125
|
}
|
|
123
126
|
static referenceHover(ref, scope, reg) {
|
|
@@ -60,7 +60,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
|
|
|
60
60
|
lookup = { type: new Types.UnknownType("DATATYPE unexpectely empty in " + this.getName()) };
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
|
-
lookup = { type: ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName()) };
|
|
63
|
+
lookup = { type: ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName(), this.getName()) };
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -28,7 +28,7 @@ class Domain extends _abstract_object_1.AbstractObject {
|
|
|
28
28
|
this.parsedType = undefined;
|
|
29
29
|
super.setDirty();
|
|
30
30
|
}
|
|
31
|
-
parseType(reg,
|
|
31
|
+
parseType(reg, dataElement) {
|
|
32
32
|
if (this.parsedType) {
|
|
33
33
|
return this.parsedType;
|
|
34
34
|
}
|
|
@@ -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,
|
|
39
|
+
this.parsedType = ddic.textToType(this.parsedXML.datatype, this.parsedXML.length, this.parsedXML.decimals, this.getName(), dataElement, this.parsedXML.conversionExit, dataElement);
|
|
40
40
|
return this.parsedType;
|
|
41
41
|
}
|
|
42
42
|
parse() {
|
|
@@ -74,7 +74,7 @@ class TableType extends _abstract_object_1.AbstractObject {
|
|
|
74
74
|
type = new Types.UnknownType("Table Type, empty DATATYPE" + this.getName(), this.getName());
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
const row = ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName()
|
|
77
|
+
const row = ddic.textToType(this.parsedXML.datatype, this.parsedXML.leng, this.parsedXML.decimals, this.getName());
|
|
78
78
|
type = new Types.TableType(row, { withHeader: false }, this.getName());
|
|
79
79
|
}
|
|
80
80
|
}
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.93.
|
|
3
|
+
"version": "2.93.96",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"typescript": "^4.9.3"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"fast-xml-parser": "^4.0.
|
|
62
|
+
"fast-xml-parser": "^4.0.12",
|
|
63
63
|
"json5": "^2.2.1",
|
|
64
64
|
"vscode-languageserver-types": "^3.17.2"
|
|
65
65
|
}
|