web 3d图形渲染器
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.

26 lines
528 B

  1. 'use strict';
  2. const Container = require('./container');
  3. class AtWord extends Container {
  4. constructor (opts) {
  5. super(opts);
  6. this.type = 'atword';
  7. }
  8. toString () {
  9. let quote = this.quoted ? this.raws.quote : '';
  10. return [
  11. this.raws.before,
  12. '@',
  13. // we can't use String() here because it'll try using itself
  14. // as the constructor
  15. String.prototype.toString.call(this.value),
  16. this.raws.after
  17. ].join('');
  18. }
  19. }
  20. Container.registerWalker(AtWord);
  21. module.exports = AtWord;