UNPKG

@opra/common

Version:
15 lines (14 loc) 404 B
import { Expression } from '../abstract/expression.js'; export class LogicalExpression extends 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 + ' '); } }