UNPKG

@abaplint/core

Version:
21 lines 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SQLField = void 0; const combi_1 = require("../combi"); const _1 = require("."); const version_1 = require("../../../version"); const tokens_1 = require("../../1_lexer/tokens"); const sql_function_1 = require("./sql_function"); const sql_path_1 = require("./sql_path"); class SQLField extends combi_1.Expression { getRunnable() { const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2)); const as = (0, combi_1.seq)("AS", _1.SQLAsName); const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant); const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)))); const arith = (0, combi_1.ver)(version_1.Version.v740sp05, sub); return (0, combi_1.seq)(field, (0, combi_1.optPrio)(arith), (0, combi_1.optPrio)(as)); } } exports.SQLField = SQLField; //# sourceMappingURL=sql_field.js.map