Skip to content

Commit 1489580

Browse files
committed
Regenerate cql4browsers
1 parent d572db3 commit 1489580

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
@@ -2404,6 +2404,13 @@ class Interval {
24042404
return new Interval(this.low, this.high, lowClosed, highClosed);
24052405
}
24062406
}
2407+
pointFrom() {
2408+
const start = this.start();
2409+
if (cmp.equals(start, this.end())) {
2410+
return start;
2411+
}
2412+
throw new Error('PointFrom operator may only be used on an interval containing a single point.');
2413+
}
24072414
toString() {
24082415
const start = this.lowClosed ? '[' : '(';
24092416
const end = this.highClosed ? ']' : ')';
@@ -5015,7 +5022,6 @@ const math_1 = require("../util/math");
50155022
const units_1 = require("../util/units");
50165023
const dtivl = __importStar(require("../datatypes/interval"));
50175024
const builder_1 = require("./builder");
5018-
const comparison_1 = require("../util/comparison");
50195025
const elmTypes_1 = require("../util/elmTypes");
50205026
class Interval extends expression_1.Expression {
50215027
constructor(json) {
@@ -5187,12 +5193,7 @@ class PointFrom extends expression_1.Expression {
51875193
if (interval == null) {
51885194
return null;
51895195
}
5190-
const start = interval.start();
5191-
const end = interval.end();
5192-
if (start == end || (0, comparison_1.equals)(start, end)) {
5193-
return start;
5194-
}
5195-
throw new Error('PointFrom operator may only be used on an interval containing a single point.');
5196+
return interval.pointFrom();
51965197
}
51975198
}
51985199
exports.PointFrom = PointFrom;
@@ -5781,7 +5782,7 @@ function truncateDecimal(decimal, decimalPlaces) {
57815782
return parseFloat(decimal.toString().match(re)[0]);
57825783
}
57835784

5784-
},{"../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){
5785+
},{"../datatypes/interval":10,"../datatypes/quantity":12,"../util/elmTypes":55,"../util/math":57,"../util/units":58,"./builder":17,"./expression":23}],28:[function(require,module,exports){
57855786
"use strict";
57865787
Object.defineProperty(exports, "__esModule", { value: true });
57875788
exports.Library = void 0;

0 commit comments

Comments
 (0)