@abaplint/core 2.88.4 → 2.88.5
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.
|
@@ -199,7 +199,18 @@ class BasicTypes {
|
|
|
199
199
|
if (nameExpr.countTokens() > 1) { // workaround for names with dashes
|
|
200
200
|
name = new identifier_1.Identifier(name.getStart(), nameExpr.concatTokens());
|
|
201
201
|
}
|
|
202
|
-
|
|
202
|
+
let qualifiedName = undefined;
|
|
203
|
+
if (this.scope.isTypePool() === true) {
|
|
204
|
+
qualifiedName = name.getStr();
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
qualifiedName = name.getStr();
|
|
208
|
+
if (this.scope.getType() === _scope_type_1.ScopeType.ClassDefinition
|
|
209
|
+
|| this.scope.getType() === _scope_type_1.ScopeType.Interface) {
|
|
210
|
+
qualifiedName = this.scope.getName() + "=>" + qualifiedName;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const found = this.parseType(node, qualifiedName);
|
|
203
214
|
if (found) {
|
|
204
215
|
return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);
|
|
205
216
|
}
|
|
@@ -301,9 +312,9 @@ class BasicTypes {
|
|
|
301
312
|
// fallback to old style syntax, OCCURS etc
|
|
302
313
|
return this.parseType(node, name);
|
|
303
314
|
}
|
|
304
|
-
parseType(node,
|
|
315
|
+
parseType(node, qualifiedName) {
|
|
305
316
|
var _a, _b, _c, _d, _e, _f;
|
|
306
|
-
const
|
|
317
|
+
const typeName = node.findFirstExpression(Expressions.TypeName);
|
|
307
318
|
let text = (_a = node.findFirstExpression(Expressions.Type)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
|
|
308
319
|
if (text === undefined) {
|
|
309
320
|
text = (_b = node.findFirstExpression(Expressions.TypeParam)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();
|
|
@@ -369,7 +380,7 @@ class BasicTypes {
|
|
|
369
380
|
}
|
|
370
381
|
found = this.resolveLikeName(sub);
|
|
371
382
|
if (found && text.includes(" OCCURS ")) {
|
|
372
|
-
found = new Types.TableType(found, { withHeader: text.includes("WITH HEADER LINE") },
|
|
383
|
+
found = new Types.TableType(found, { withHeader: text.includes("WITH HEADER LINE") }, qualifiedName);
|
|
373
384
|
}
|
|
374
385
|
}
|
|
375
386
|
else if (text.startsWith("TYPE LINE OF ")) {
|
|
@@ -392,13 +403,13 @@ class BasicTypes {
|
|
|
392
403
|
}
|
|
393
404
|
}
|
|
394
405
|
else if (text.startsWith("TYPE REF TO ")) {
|
|
395
|
-
found = this.resolveTypeRef(
|
|
406
|
+
found = this.resolveTypeRef(typeName);
|
|
396
407
|
}
|
|
397
408
|
else if (text.startsWith("TYPE")) {
|
|
398
|
-
found = this.resolveTypeName(
|
|
409
|
+
found = this.resolveTypeName(typeName, this.findLength(node), this.findDecimals(node), qualifiedName);
|
|
399
410
|
const concat = node.concatTokens().toUpperCase();
|
|
400
411
|
if (found && concat.includes(" OCCURS ")) {
|
|
401
|
-
found = new Types.TableType(found, { withHeader: concat.includes("WITH HEADER LINE") },
|
|
412
|
+
found = new Types.TableType(found, { withHeader: concat.includes("WITH HEADER LINE") }, qualifiedName);
|
|
402
413
|
}
|
|
403
414
|
else if (found && concat.includes("WITH HEADER LINE")) {
|
|
404
415
|
if (found instanceof Types.VoidType) {
|
|
@@ -411,7 +422,7 @@ class BasicTypes {
|
|
|
411
422
|
found = new Types.TableType(found.getRowType(), { withHeader: true });
|
|
412
423
|
}
|
|
413
424
|
}
|
|
414
|
-
if (found === undefined &&
|
|
425
|
+
if (found === undefined && typeName === undefined) {
|
|
415
426
|
let length = 1;
|
|
416
427
|
const len = node.findDirectExpression(Expressions.ConstantFieldLength);
|
|
417
428
|
if (len) {
|
|
@@ -420,9 +431,9 @@ class BasicTypes {
|
|
|
420
431
|
length = parseInt(int.concatTokens(), 10);
|
|
421
432
|
}
|
|
422
433
|
}
|
|
423
|
-
found = new Types.CharacterType(length,
|
|
434
|
+
found = new Types.CharacterType(length, qualifiedName); // fallback
|
|
424
435
|
if (concat.includes(" OCCURS ")) {
|
|
425
|
-
found = new Types.TableType(found, { withHeader: concat.includes("WITH HEADER LINE") },
|
|
436
|
+
found = new Types.TableType(found, { withHeader: concat.includes("WITH HEADER LINE") }, qualifiedName);
|
|
426
437
|
}
|
|
427
438
|
}
|
|
428
439
|
}
|
package/build/src/registry.js
CHANGED