Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
528 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | const Container = require('./container');
|
---|
4 |
|
---|
5 | class AtWord extends Container {
|
---|
6 | constructor (opts) {
|
---|
7 | super(opts);
|
---|
8 | this.type = 'atword';
|
---|
9 | }
|
---|
10 |
|
---|
11 | toString () {
|
---|
12 | let quote = this.quoted ? this.raws.quote : '';
|
---|
13 | return [
|
---|
14 | this.raws.before,
|
---|
15 | '@',
|
---|
16 | // we can't use String() here because it'll try using itself
|
---|
17 | // as the constructor
|
---|
18 | String.prototype.toString.call(this.value),
|
---|
19 | this.raws.after
|
---|
20 | ].join('');
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | Container.registerWalker(AtWord);
|
---|
25 |
|
---|
26 | module.exports = AtWord;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.