(statement: lua.Statement)
| 335 | } |
| 336 | |
| 337 | public printStatement(statement: lua.Statement): SourceNode { |
| 338 | let resultNode = this.printStatementExcludingComments(statement); |
| 339 | |
| 340 | if (statement.leadingComments) { |
| 341 | resultNode = this.concatNodes( |
| 342 | statement.leadingComments.map(c => this.printComment(c)).join("\n"), |
| 343 | "\n", |
| 344 | resultNode |
| 345 | ); |
| 346 | } |
| 347 | |
| 348 | if (statement.trailingComments) { |
| 349 | resultNode = this.concatNodes( |
| 350 | resultNode, |
| 351 | "\n", |
| 352 | statement.trailingComments.map(c => this.printComment(c)).join("\n") |
| 353 | ); |
| 354 | } |
| 355 | |
| 356 | return resultNode; |
| 357 | } |
| 358 | |
| 359 | public printComment(comment: string | string[]): SourceChunk { |
| 360 | if (Array.isArray(comment)) { |
no test coverage detected