UNPKG

@opra/common

Version:
16 lines (15 loc) 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComparisonExpression = void 0; const expression_js_1 = require("../abstract/expression.js"); const WORD_PATTERN = /\w/; class ComparisonExpression extends expression_js_1.Expression { constructor(o) { super(); Object.assign(this, o); } toString() { return `${this.left}${WORD_PATTERN.test(this.op) ? ' ' + this.op + ' ' : this.op}${this.right}`; } } exports.ComparisonExpression = ComparisonExpression;