1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | var Node = require('./node');
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | var Comment = module.exports = function Comment(str, suppress, inline){
|
24 | Node.call(this);
|
25 | this.str = str;
|
26 | this.suppress = suppress;
|
27 | this.inline = inline;
|
28 | };
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 | Comment.prototype.__proto__ = Node.prototype;
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | Comment.prototype.toJSON = function(){
|
44 | return {
|
45 | __type: 'Comment',
|
46 | str: this.str,
|
47 | suppress: this.suppress,
|
48 | inline: this.inline,
|
49 | lineno: this.lineno,
|
50 | column: this.column,
|
51 | filename: this.filename
|
52 | };
|
53 | };
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 | Comment.prototype.toString = function(){
|
63 | return this.str;
|
64 | };
|