(node, metadata)
| 117 | } |
| 118 | |
| 119 | visitNode(node, metadata) { |
| 120 | if (node.type === Syntax.Program && node.body.length > 0) { |
| 121 | return; |
| 122 | } |
| 123 | |
| 124 | this.insertInnerComments(node, metadata); |
| 125 | const trailingComments = this.findTrailingComments(metadata); |
| 126 | const leadingComments = this.findLeadingComments(metadata); |
| 127 | if (leadingComments.length > 0) { |
| 128 | node.leadingComments = leadingComments; |
| 129 | } |
| 130 | if (trailingComments.length > 0) { |
| 131 | node.trailingComments = trailingComments; |
| 132 | } |
| 133 | |
| 134 | this.stack.push({ |
| 135 | node: node, |
| 136 | start: metadata.start.offset |
| 137 | }); |
| 138 | } |
| 139 | |
| 140 | visitComment(node, metadata) { |
| 141 | const type = (node.type[0] === 'L') ? 'Line' : 'Block'; |
no test coverage detected