@abaplint/transpiler 2.3.68 → 2.3.70
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/src/expressions/sql_cond.js +5 -0
- package/build/src/statements/index.d.ts +1 -0
- package/build/src/statements/index.js +1 -0
- package/build/src/statements/read_table.js +7 -1
- package/build/src/statements/syntax_check.d.ts +7 -0
- package/build/src/statements/syntax_check.js +11 -0
- package/package.json +1 -1
|
@@ -61,6 +61,11 @@ class SQLCondTranspiler {
|
|
|
61
61
|
const fieldName = c.findDirectExpression(abaplint.Expressions.SQLFieldName);
|
|
62
62
|
const operator = c.findDirectExpression(abaplint.Expressions.SQLCompareOperator);
|
|
63
63
|
const source = c.findDirectExpression(abaplint.Expressions.SQLSource);
|
|
64
|
+
if (fieldName && source && operator === undefined && c.findDirectTokenByText("LIKE")) {
|
|
65
|
+
ret += fieldName.concatTokens() + " LIKE ";
|
|
66
|
+
ret += this.sqlSource(source, traversal);
|
|
67
|
+
return ret;
|
|
68
|
+
}
|
|
64
69
|
if (fieldName === undefined || operator === undefined || source === undefined) {
|
|
65
70
|
throw new Error("SQL Condition, transpiler todo2, " + c.concatTokens());
|
|
66
71
|
}
|
|
@@ -113,6 +113,7 @@ export * from "./split";
|
|
|
113
113
|
export * from "./start_of_selection";
|
|
114
114
|
export * from "./submit";
|
|
115
115
|
export * from "./subtract";
|
|
116
|
+
export * from "./syntax_check";
|
|
116
117
|
export * from "./translate";
|
|
117
118
|
export * from "./truncate_dataset";
|
|
118
119
|
export * from "./try";
|
|
@@ -129,6 +129,7 @@ __exportStar(require("./split"), exports);
|
|
|
129
129
|
__exportStar(require("./start_of_selection"), exports);
|
|
130
130
|
__exportStar(require("./submit"), exports);
|
|
131
131
|
__exportStar(require("./subtract"), exports);
|
|
132
|
+
__exportStar(require("./syntax_check"), exports);
|
|
132
133
|
__exportStar(require("./translate"), exports);
|
|
133
134
|
__exportStar(require("./truncate_dataset"), exports);
|
|
134
135
|
__exportStar(require("./try"), exports);
|
|
@@ -45,7 +45,13 @@ class ReadTableTranspiler {
|
|
|
45
45
|
const left = compare.getChildren()[i * 3];
|
|
46
46
|
const source = compare.getChildren()[(i * 3) + 2];
|
|
47
47
|
const s = traversal.traverse(source).getCode();
|
|
48
|
-
let field = left.concatTokens().toLowerCase()
|
|
48
|
+
let field = left.concatTokens().toLowerCase();
|
|
49
|
+
while (field.includes("->")) {
|
|
50
|
+
field = field.replace("->", ".get().");
|
|
51
|
+
}
|
|
52
|
+
while (field.includes("-")) {
|
|
53
|
+
field = field.replace("-", ".get().");
|
|
54
|
+
}
|
|
49
55
|
if (left.get() instanceof abaplint.Expressions.Dynamic
|
|
50
56
|
&& left instanceof abaplint.Nodes.ExpressionNode) {
|
|
51
57
|
const concat = left.concatTokens().toLowerCase();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as abaplint from "@abaplint/core";
|
|
2
|
+
import { IStatementTranspiler } from "./_statement_transpiler";
|
|
3
|
+
import { Traversal } from "../traversal";
|
|
4
|
+
import { Chunk } from "../chunk";
|
|
5
|
+
export declare class SyntaxCheckTranspiler implements IStatementTranspiler {
|
|
6
|
+
transpile(_node: abaplint.Nodes.StatementNode, _traversal: Traversal): Chunk;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyntaxCheckTranspiler = void 0;
|
|
4
|
+
const chunk_1 = require("../chunk");
|
|
5
|
+
class SyntaxCheckTranspiler {
|
|
6
|
+
transpile(_node, _traversal) {
|
|
7
|
+
return new chunk_1.Chunk(`throw new Error("SyntaxCheck, transpiler todo");`);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.SyntaxCheckTranspiler = SyntaxCheckTranspiler;
|
|
11
|
+
//# sourceMappingURL=syntax_check.js.map
|