1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | var Node = require('./node');
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | var Atblock = module.exports = function Atblock(){
|
20 | Node.call(this);
|
21 | };
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | Atblock.prototype.__defineGetter__('nodes', function(){
|
28 | return this.block.nodes;
|
29 | });
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | Atblock.prototype.__proto__ = Node.prototype;
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | Atblock.prototype.clone = function(parent){
|
45 | var clone = new Atblock;
|
46 | clone.block = this.block.clone(parent, clone);
|
47 | clone.lineno = this.lineno;
|
48 | clone.column = this.column;
|
49 | clone.filename = this.filename;
|
50 | return clone;
|
51 | };
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | Atblock.prototype.toString = function(){
|
61 | return '@block';
|
62 | };
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | Atblock.prototype.toJSON = function(){
|
72 | return {
|
73 | __type: 'Atblock',
|
74 | block: this.block,
|
75 | lineno: this.lineno,
|
76 | column: this.column,
|
77 | fileno: this.fileno
|
78 | };
|
79 | };
|