Sha256: 2fa2d4d3fa214563382029655df02956f99dee7a2539e03068e561d1b8c77b28

Contents?: true

Size: 748 Bytes

Versions: 100

Compression:

Stored size: 748 Bytes

Contents

/*!
 * Stylus - UnaryOp
 * Copyright(c) 2010 LearnBoost <dev@learnboost.com>
 * MIT Licensed
 */

/**
 * Module dependencies.
 */

var Node = require('./node');

/**
 * Initialize a new `UnaryOp` with `op`, and `expr`.
 *
 * @param {String} op
 * @param {Node} expr
 * @api public
 */

var UnaryOp = module.exports = function UnaryOp(op, expr){
  Node.call(this);
  this.op = op;
  this.expr = expr;
};

/**
 * Inherit from `Node.prototype`.
 */

UnaryOp.prototype.__proto__ = Node.prototype;

/**
 * Return a clone of this node.
 * 
 * @return {Node}
 * @api public
 */

UnaryOp.prototype.clone = function(){
  var clone = new UnaryOp(this.op, this.expr.clone());
  clone.lineno = this.lineno;
  clone.filename = this.filename;
  return clone;
};

Version data entries

100 entries across 86 versions & 2 rubygems

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