@abaplint/core 2.120.35 → 2.120.36
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.
|
@@ -533,7 +533,7 @@ class BasicTypes {
|
|
|
533
533
|
return Types.VoidType.get((_f = node.findFirstExpression(Expressions.TypeStructure)) === null || _f === void 0 ? void 0 : _f.concatTokens());
|
|
534
534
|
}
|
|
535
535
|
else if (text.startsWith("LIKE LINE OF ")) {
|
|
536
|
-
|
|
536
|
+
let name = (_g = node.findFirstExpression(Expressions.FieldChain)) === null || _g === void 0 ? void 0 : _g.concatTokens();
|
|
537
537
|
let e = node.findFirstExpression(Expressions.Type);
|
|
538
538
|
if (e === undefined) {
|
|
539
539
|
e = node.findFirstExpression(Expressions.FormParamType);
|
|
@@ -541,19 +541,32 @@ class BasicTypes {
|
|
|
541
541
|
if (e === undefined) {
|
|
542
542
|
e = node.findFirstExpression(Expressions.FieldChain);
|
|
543
543
|
}
|
|
544
|
+
if (e === undefined) {
|
|
545
|
+
// old style, eg "LIKE LINE OF tab OCCURS 0 WITH HEADER LINE", it is parsed as TypeName
|
|
546
|
+
e = typeName;
|
|
547
|
+
name = typeName === null || typeName === void 0 ? void 0 : typeName.concatTokens();
|
|
548
|
+
}
|
|
544
549
|
const type = this.resolveLikeName(e, false);
|
|
550
|
+
let row = undefined;
|
|
545
551
|
if (type === undefined) {
|
|
546
552
|
return new Types.UnknownType("Type error, could not resolve \"" + name + "\", parseType");
|
|
547
553
|
}
|
|
548
554
|
else if (type instanceof Types.TableType) {
|
|
549
|
-
|
|
555
|
+
row = type.getRowType();
|
|
550
556
|
}
|
|
551
557
|
else if (type instanceof Types.VoidType) {
|
|
552
|
-
|
|
558
|
+
row = type;
|
|
553
559
|
}
|
|
554
560
|
else {
|
|
555
561
|
return new Types.UnknownType("Type error, not a table type " + name);
|
|
556
562
|
}
|
|
563
|
+
if (this.isOccurs(node)) {
|
|
564
|
+
return new Types.TableType(row, {
|
|
565
|
+
withHeader: text.includes(" WITH HEADER LINE"),
|
|
566
|
+
keyType: Types.TableKeyType.default
|
|
567
|
+
}, qualifiedName);
|
|
568
|
+
}
|
|
569
|
+
return row;
|
|
557
570
|
}
|
|
558
571
|
else if (text.startsWith("LIKE REF TO ")) {
|
|
559
572
|
const name = (_h = node.findFirstExpression(Expressions.FieldChain)) === null || _h === void 0 ? void 0 : _h.concatTokens();
|
package/build/src/registry.js
CHANGED