( code: string, start: number, end: number )
| 2531 | |
| 2532 | // the comma separating two elements, past their parentheses and comments |
| 2533 | const commaBetween = ( |
| 2534 | code: string, |
| 2535 | start: number, |
| 2536 | end: number |
| 2537 | ): number | undefined => { |
| 2538 | for (let i = start; i < end; i++) { |
| 2539 | if (code[i] === ",") return i |
| 2540 | if (code.startsWith("/*", i)) i = code.indexOf("*/", i + 2) + 1 |
| 2541 | else if (code.startsWith("//", i)) i = code.indexOf("\n", i) |
| 2542 | } |
| 2543 | } |