UNPKG

@opra/common

Version:
19 lines (18 loc) 579 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LogicalExpression = void 0; const expression_js_1 = require("../abstract/expression.js"); class LogicalExpression extends expression_js_1.Expression { constructor(o) { super(); Object.assign(this, o); if (this.op === '&&') this.op = 'and'; if (this.op === '||') this.op = 'or'; } toString() { return this.items.map(child => '' + child).join(' ' + this.op + ' '); } } exports.LogicalExpression = LogicalExpression;