Sha256: c789efaa95161687786f8a070953feee5cca6b81b9bff24deda30d7a484e60de
Contents?: true
Size: 1.08 KB
Versions: 16
Compression:
Stored size: 1.08 KB
Contents
/*! * Stylus - BinOp * Copyright(c) 2010 LearnBoost <dev@learnboost.com> * MIT Licensed */ /** * Module dependencies. */ var Node = require('./node'); /** * Initialize a new `BinOp` with `op`, `left` and `right`. * * @param {String} op * @param {Node} left * @param {Node} right * @api public */ var BinOp = module.exports = function BinOp(op, left, right){ Node.call(this); this.op = op; this.left = left; this.right = right; }; /** * Inherit from `Node.prototype`. */ BinOp.prototype.__proto__ = Node.prototype; /** * Return a clone of this node. * * @return {Node} * @api public */ BinOp.prototype.clone = function(){ var clone = new BinOp( this.op , this.left.clone() , this.right ? this.right.clone() : null); clone.lineno = this.lineno; clone.filename = this.filename; if (this.val) clone.val = this.val.clone(); return clone; }; /** * Return <left> <op> <right> * * @return {String} * @api public */ BinOp.prototype.toString = function() { return this.left.toString() + ' ' + this.op + ' ' + this.right.toString(); };
Version data entries
16 entries across 16 versions & 1 rubygems