UNPKG

@opra/common

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