(statement: lua.FunctionDefinition)
| 689 | } |
| 690 | |
| 691 | public printFunctionDefinition(statement: lua.FunctionDefinition): SourceNode { |
| 692 | const expression = statement.right[0]; |
| 693 | const chunks: SourceChunk[] = []; |
| 694 | |
| 695 | chunks.push("function "); |
| 696 | chunks.push(this.printExpression(statement.left[0])); |
| 697 | chunks.push("("); |
| 698 | chunks.push(...this.printFunctionParameters(expression)); |
| 699 | chunks.push(")\n"); |
| 700 | |
| 701 | this.pushIndent(); |
| 702 | chunks.push(this.printBlock(expression.body)); |
| 703 | this.popIndent(); |
| 704 | chunks.push(this.indent(this.createSourceNode(statement, "end"))); |
| 705 | |
| 706 | return this.createSourceNode(expression, chunks); |
| 707 | } |
| 708 | |
| 709 | public printTableFieldExpression(expression: lua.TableFieldExpression): SourceNode { |
| 710 | const chunks: SourceChunk[] = []; |
no test coverage detected