Sha256: 781f3e93a9a8080344136060ddfc61e639df1e0f41c4b1bcb6143a4ec01ad4d1

Contents?: true

Size: 909 Bytes

Versions: 84

Compression:

Stored size: 909 Bytes

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;
};

Version data entries

84 entries across 70 versions & 2 rubygems

Version Path
ela-4.1.6 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-4.1.6 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-4.1.5 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-4.1.5 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-4.1.4 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-4.1.4 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-4.1.3 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-4.1.3 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-4.1.2 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-4.1.2 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-4.1.1 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-4.1.1 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-4.1.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-4.1.0 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-4.0.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.4.3 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.4.2 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.4.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.3.1 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.3.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js