@abaplint/core 2.85.26 → 2.85.27
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
CHANGED
|
@@ -4996,6 +4996,7 @@ declare class StatementNode extends AbstractNode<ExpressionNode | TokenNode> {
|
|
|
4996
4996
|
*/
|
|
4997
4997
|
findTokenSequencePosition(first: string, second: string): Position | undefined;
|
|
4998
4998
|
findExpressionAfterToken(text: string): ExpressionNode | undefined;
|
|
4999
|
+
findExpressionsAfterToken(text: string): ExpressionNode[];
|
|
4999
5000
|
private toTokens;
|
|
5000
5001
|
private toTokenNodess;
|
|
5001
5002
|
}
|
|
@@ -26,9 +26,11 @@ class Find {
|
|
|
26
26
|
this.inline(rfound, scope, filename, new basic_1.TableType(type, { withHeader: false }));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
const ofound = node.
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const ofound = node.findExpressionsAfterToken("OFFSET");
|
|
30
|
+
for (const o of ofound) {
|
|
31
|
+
if (o.get() instanceof Expressions.Target) {
|
|
32
|
+
this.inline(o, scope, filename, new basic_1.IntegerType());
|
|
33
|
+
}
|
|
32
34
|
}
|
|
33
35
|
const lfound = node.findExpressionAfterToken("LINE");
|
|
34
36
|
if (lfound && lfound.get() instanceof Expressions.Target) {
|
|
@@ -44,7 +46,10 @@ class Find {
|
|
|
44
46
|
}
|
|
45
47
|
if (node.findDirectTokenByText("SUBMATCHES")) {
|
|
46
48
|
for (const t of node.findDirectExpressions(Expressions.Target)) {
|
|
47
|
-
if (t === rfound || t ===
|
|
49
|
+
if (t === rfound || t === lfound || t === cfound || t === lnfound) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
else if (ofound.indexOf(t) >= 0) {
|
|
48
53
|
continue;
|
|
49
54
|
}
|
|
50
55
|
const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
|
|
@@ -255,6 +255,20 @@ class StatementNode extends _abstract_node_1.AbstractNode {
|
|
|
255
255
|
}
|
|
256
256
|
return undefined;
|
|
257
257
|
}
|
|
258
|
+
findExpressionsAfterToken(text) {
|
|
259
|
+
const children = this.getChildren();
|
|
260
|
+
const ret = [];
|
|
261
|
+
for (let i = 0; i < children.length - 1; i++) {
|
|
262
|
+
const c = children[i];
|
|
263
|
+
const next = children[i + 1];
|
|
264
|
+
if (c instanceof token_node_1.TokenNode
|
|
265
|
+
&& c.get().getStr().toUpperCase() === text.toUpperCase()
|
|
266
|
+
&& next instanceof expression_node_1.ExpressionNode) {
|
|
267
|
+
ret.push(next);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return ret;
|
|
271
|
+
}
|
|
258
272
|
////////////////////////////////
|
|
259
273
|
toTokens(b) {
|
|
260
274
|
const tokens = [];
|
package/build/src/registry.js
CHANGED
|
@@ -335,6 +335,9 @@ Only one transformation is applied to a statement at a time, so multiple steps m
|
|
|
335
335
|
if (fields.length === 1) {
|
|
336
336
|
fieldDefinition = `DATA ${name} TYPE ${tableName}-${fields[0].concatTokens()}.`;
|
|
337
337
|
}
|
|
338
|
+
else if (fieldList.concatTokens() === "*") {
|
|
339
|
+
fieldDefinition = `DATA ${name} TYPE ${tableName}.`;
|
|
340
|
+
}
|
|
338
341
|
else {
|
|
339
342
|
for (const f of fields) {
|
|
340
343
|
const fieldName = f.concatTokens();
|