Skip to content

Commit 5f505e9

Browse files
committed
Regenerate cql4browsers
1 parent 6df77e1 commit 5f505e9

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

examples/browser/cql4browsers.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,6 +2412,13 @@ class Interval {
24122412
return new Interval(this.low, this.high, lowClosed, highClosed);
24132413
}
24142414
}
2415+
pointFrom() {
2416+
const start = this.start();
2417+
if (cmp.equals(start, this.end())) {
2418+
return start;
2419+
}
2420+
throw new Error('PointFrom operator may only be used on an interval containing a single point.');
2421+
}
24152422
toString() {
24162423
const start = this.lowClosed ? '[' : '(';
24172424
const end = this.highClosed ? ']' : ')';
@@ -5101,7 +5108,6 @@ const math_1 = require("../util/math");
51015108
const units_1 = require("../util/units");
51025109
const dtivl = __importStar(require("../datatypes/interval"));
51035110
const builder_1 = require("./builder");
5104-
const comparison_1 = require("../util/comparison");
51055111
const elmTypes_1 = require("../util/elmTypes");
51065112
class Interval extends expression_1.Expression {
51075113
constructor(json) {
@@ -5273,12 +5279,7 @@ class PointFrom extends expression_1.Expression {
52735279
if (interval == null) {
52745280
return null;
52755281
}
5276-
const start = interval.start();
5277-
const end = interval.end();
5278-
if (start == end || (0, comparison_1.equals)(start, end)) {
5279-
return start;
5280-
}
5281-
throw new Error('PointFrom operator may only be used on an interval containing a single point.');
5282+
return interval.pointFrom();
52825283
}
52835284
}
52845285
exports.PointFrom = PointFrom;
@@ -5867,7 +5868,7 @@ function truncateDecimal(decimal, decimalPlaces) {
58675868
return parseFloat(decimal.toString().match(re)[0]);
58685869
}
58695870

5870-
},{"../datatypes/interval":10,"../datatypes/quantity":12,"../util/comparison":53,"../util/elmTypes":55,"../util/math":57,"../util/units":58,"./builder":17,"./expression":23}],28:[function(require,module,exports){
5871+
},{"../datatypes/interval":10,"../datatypes/quantity":12,"../util/elmTypes":55,"../util/math":57,"../util/units":58,"./builder":17,"./expression":23}],28:[function(require,module,exports){
58715872
"use strict";
58725873
Object.defineProperty(exports, "__esModule", { value: true });
58735874
exports.Library = void 0;

0 commit comments

Comments
 (0)