block.js 430 B

123456789101112131415161718192021222324
  1. 'use strict';
  2. var utils = require('./utils');
  3. /**
  4. * Create a new BlockComment
  5. *
  6. * @param {String} `str` string of JavaScript
  7. * @param {Object} `token` Parsed AST token
  8. */
  9. function BlockComment(str, token) {
  10. this.type = token.type;
  11. this.range = token.range;
  12. this.loc = token.loc;
  13. this.raw = token.value;
  14. this.value = utils.stripStars(this.raw);
  15. }
  16. /**
  17. * expose `BlockComment`
  18. */
  19. module.exports = BlockComment;