(comment: string | string[])
| 357 | } |
| 358 | |
| 359 | public printComment(comment: string | string[]): SourceChunk { |
| 360 | if (Array.isArray(comment)) { |
| 361 | if (comment.length === 0) { |
| 362 | return this.indent("--[[]]"); |
| 363 | } else { |
| 364 | const [firstLine, ...restLines] = comment; |
| 365 | const commentLines = this.concatNodes(...restLines.map(c => this.concatNodes("\n", this.indent(c)))); |
| 366 | return this.concatNodes(this.indent("--[["), firstLine, commentLines, "]]"); |
| 367 | } |
| 368 | } else { |
| 369 | return this.indent(`--${comment}`); |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | protected printStatementExcludingComments(statement: lua.Statement): SourceNode { |
| 374 | switch (statement.kind) { |
no test coverage detected