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-3.3.0 node_modules/poised.old/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-3.2.0 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-3.2.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.1.1 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-3.1.1 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.1.0 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-3.1.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.0.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-3.0.0 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-2.0.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-2.0.0 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
ela-1.1.0 node_modules/codo/node_modules/stylus/lib/nodes/binop.js
ela-1.1.0 node_modules/poised/node_modules/nib/node_modules/stylus/lib/nodes/binop.js
stylus-source-0.38.0 vendor/lib/nodes/binop.js
stylus-source-0.37.0 vendor/lib/nodes/binop.js
stylus-source-0.36.1 vendor/lib/nodes/binop.js
stylus-source-0.36.0 vendor/lib/nodes/binop.js
stylus-source-0.35.1 vendor/lib/nodes/binop.js
stylus-source-0.35.0 vendor/lib/nodes/binop.js
stylus-source-0.34.1 vendor/lib/nodes/binop.js