(expr: cs.InvocationExpression)
| 247 | } |
| 248 | |
| 249 | protected writeInvocationExpression(expr: cs.InvocationExpression) { |
| 250 | this.writeExpression(expr.expression); |
| 251 | if (expr.typeArguments) { |
| 252 | this.write('<'); |
| 253 | this.writeCommaSeparated(expr.typeArguments, t => this.writeType(t)); |
| 254 | this.write('>'); |
| 255 | } |
| 256 | |
| 257 | if (expr.nullSafe) { |
| 258 | this.write('?.'); |
| 259 | this.write(this._context.toMethodNameCase('invoke')); |
| 260 | } |
| 261 | |
| 262 | this.write('('); |
| 263 | if (expr.arguments.length > 5) { |
| 264 | this.writeLine(); |
| 265 | this._indent++; |
| 266 | this.writeCommaSeparated( |
| 267 | expr.arguments, |
| 268 | a => { |
| 269 | this.writeExpression(a); |
| 270 | this.writeLine(); |
| 271 | }, |
| 272 | true |
| 273 | ); |
| 274 | this._indent--; |
| 275 | this.writeLine(); |
| 276 | } else { |
| 277 | this.writeCommaSeparated(expr.arguments, a => this.writeExpression(a)); |
| 278 | } |
| 279 | this.write(')'); |
| 280 | } |
| 281 | |
| 282 | protected writeNullLiteral(_expr: cs.NullLiteral) { |
| 283 | this.write('null'); |
nothing calls this directly
no test coverage detected