(sourceNode: SourceNode)
| 300 | } |
| 301 | |
| 302 | private nodeStartsWithParenthesis(sourceNode: SourceNode): boolean { |
| 303 | let result: boolean | undefined; |
| 304 | sourceNode.walk(chunk => { |
| 305 | if (result === undefined) { |
| 306 | chunk = chunk.trimLeft(); // Ignore leading whitespace |
| 307 | |
| 308 | if (chunk.length > 0) { |
| 309 | result = chunk.startsWith("("); |
| 310 | } |
| 311 | } |
| 312 | }); |
| 313 | return result ?? false; |
| 314 | } |
| 315 | |
| 316 | protected printStatementArray(statements: lua.Statement[]): SourceChunk[] { |
| 317 | const statementNodes: SourceNode[] = []; |