A Twitch.tv viewer reward and games system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
617 B

  1. 'use strict';
  2. var Node = require('./node');
  3. /**
  4. * Initialize a `Code` node with the given code `val`.
  5. * Code may also be optionally buffered and escaped.
  6. *
  7. * @param {String} val
  8. * @param {Boolean} buffer
  9. * @param {Boolean} escape
  10. * @api public
  11. */
  12. var Code = module.exports = function Code(val, buffer, escape) {
  13. this.val = val;
  14. this.buffer = buffer;
  15. this.escape = escape;
  16. if (val.match(/^ *else/)) this.debug = false;
  17. };
  18. // Inherit from `Node`.
  19. Code.prototype = Object.create(Node.prototype);
  20. Code.prototype.constructor = Code;
  21. Code.prototype.type = 'Code'; // prevent the minifiers removing this