()
| 166 | } |
| 167 | |
| 168 | toCode(): string { |
| 169 | if (this.multiLine) { |
| 170 | if (this.args.length === 0) { |
| 171 | return `${this.name}()`; |
| 172 | } |
| 173 | if (this.args.length === 1) { |
| 174 | return `${this.name}(${this.args[0].toCode()})`; |
| 175 | } |
| 176 | return `${this.name}(${indentList(this.args)})`; |
| 177 | } |
| 178 | return `${this.name}(${this.args.map(asString).join(", ")})`; |
| 179 | } |
| 180 | |
| 181 | addArg(...args: PythonCode[]): FunctionCall { |
| 182 | return new FunctionCall(this.name, [...this.args, ...args], this.multiLine); |
no test coverage detected