UNPKG

@abaplint/core

Version:
18 lines 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CDSAnnotationSimple = void 0; const _1 = require("."); const cds_prefixed_name_1 = require("./cds_prefixed_name"); const combi_1 = require("../../abap/2_statements/combi"); class CDSAnnotationSimple extends combi_1.Expression { getRunnable() { const ident = (0, combi_1.regex)(/^[\w_]+$/); // #(expr) where expr can be: identifier, dotted path, string, or concatenation with + const hashArg = (0, combi_1.altPrio)(_1.CDSString, cds_prefixed_name_1.CDSPrefixedName, ident); const hashExpr = (0, combi_1.seq)(hashArg, (0, combi_1.starPrio)((0, combi_1.seq)("+", hashArg))); const value = (0, combi_1.altPrio)(_1.CDSString, "true", "false", "null", (0, combi_1.seq)("-", (0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)("-", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)((0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.regex)(/^\d+$/), (0, combi_1.seq)("#", "(", hashExpr, ")"), (0, combi_1.regex)(/^#[\w_]+$/)); return value; } } exports.CDSAnnotationSimple = CDSAnnotationSimple; //# sourceMappingURL=cds_annotation_simple.js.map