| 439 | }; |
| 440 | |
| 441 | const getLowestStartLocation = (locations: SingleLocationData[]): SingleLocationData => { |
| 442 | return locations.reduce((lowest, current) => { |
| 443 | if (current.location.start.line < lowest.location.start.line) { |
| 444 | return current; |
| 445 | } |
| 446 | |
| 447 | if (lowest.location.start.line === current.location.start.line) { |
| 448 | if (current.location.start.column < lowest.location.start.column) { |
| 449 | return current; |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | return lowest; |
| 454 | }, locations[0]); |
| 455 | }; |
| 456 | |
| 457 | const mergeAsm = (asm1: string, asm2: string): string => { |
| 458 | // We merge two ASM strings by adding a space between them, and removing any duplicate spaces |