aboutsummaryrefslogtreecommitdiff
path: root/node_modules/stylus/lib/functions/operate.js
blob: ae244bab3597203c279f4d03c891ed63a90fee33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var utils = require('../utils');

/**
 * Perform `op` on the `left` and `right` operands.
 *
 * @param {String} op
 * @param {Node} left
 * @param {Node} right
 * @return {Node}
 * @api public
 */

module.exports = function operate(op, left, right){
  utils.assertType(op, 'string', 'op');
  utils.assertPresent(left, 'left');
  utils.assertPresent(right, 'right');
  return left.operate(op.val, right);
};