UNPKG

@madie/cql-antlr-parser

Version:
29 lines 1.22 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const CreatorBase_1 = __importDefault(require("./CreatorBase")); const generated_1 = require("../generated"); class CqlValueSetSystemCreator extends CreatorBase_1.default { constructor(ctx, model) { super(ctx, {}); this.model = model; } build() { var _a; this.cqlDao.name = this.findChildText(generated_1.cqlLexer.QUOTEDIDENTIFIER); this.cqlDao.url = this.findChildText(generated_1.cqlLexer.STRING); if (this.model === "QDM") { this.cqlDao.version = this.findChildText(generated_1.cqlLexer.STRING, 2); } else { const tokens = (_a = this.cqlDao.url) === null || _a === void 0 ? void 0 : _a.split("|"); this.cqlDao.version = (tokens === null || tokens === void 0 ? void 0 : tokens.length) === 2 ? tokens[1] : undefined; } this.cqlDao.hits = 0; return this.cqlDao; } } exports.default = CqlValueSetSystemCreator; //# sourceMappingURL=CqlCodeValueSystemCreator.js.map