UNPKG

@abaplint/core

Version:
33 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DDLLexer = void 0; const tokens_1 = require("../abap/1_lexer/tokens"); const position_1 = require("../position"); class DDLLexer { static run(file) { const step1 = []; const lines = file.getRaw().replace(/\r/g, "").split("\n"); for (const l of lines) { if (l.startsWith("@")) { continue; // skip annotations for now } step1.push(...l.split(" ")); } const step2 = []; for (const t of step1) { if (t === "") { continue; } else if (t.endsWith(";")) { step2.push(t.substr(0, t.length - 1)); step2.push(";"); } else { step2.push(t); } } return step2.map(t => new tokens_1.Identifier(new position_1.Position(1, 1), t)); } } exports.DDLLexer = DDLLexer; //# sourceMappingURL=ddl_lexer.js.map