UNPKG

@abaplint/transpiler

Version:
28 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SQLFromSourceTranspiler = void 0; const abaplint = require("@abaplint/core"); const chunk_1 = require("../chunk"); const database_table_1 = require("./database_table"); class SQLFromSourceTranspiler { transpile(node, traversal) { const chunk = new chunk_1.Chunk(); for (const c of node.getChildren()) { const concat = c.concatTokens(); if (c instanceof abaplint.Nodes.TokenNode) { // keywords chunk.appendString(concat + " "); } else if (c.get() instanceof abaplint.Expressions.DatabaseTable) { chunk.appendString(`" + ` + new database_table_1.DatabaseTableTranspiler().transpile(c, traversal).getCode() + ` + "`); chunk.appendString(" "); } else { chunk.appendString(concat + " "); } } return chunk; } } exports.SQLFromSourceTranspiler = SQLFromSourceTranspiler; //# sourceMappingURL=sql_from_source.js.map