xpath-ts2
Version:
DOM 3 and 4 XPath 1.0 implementation for browser and Node.js environment with support for typescript 5.
18 lines • 580 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrOperation = void 0;
const binary_operation_1 = require("./binary-operation");
class OrOperation extends binary_operation_1.BinaryOperation {
evaluate(c) {
const b = this.lhs.evaluate(c).bool;
if (b.booleanValue) {
return b;
}
return this.rhs.evaluate(c).bool;
}
toString() {
return '(' + this.lhs.toString() + ' or ' + this.rhs.toString() + ')';
}
}
exports.OrOperation = OrOperation;
//# sourceMappingURL=or-operation.js.map
;