The name of the directive whose `#` is at `i` (`if`, `import`, `endif`).
(source: string, i: number)
| 206 | |
| 207 | /** The name of the directive whose `#` is at `i` (`if`, `import`, `endif`). */ |
| 208 | function directiveName(source: string, i: number): string { |
| 209 | let j = i + 1; |
| 210 | while (j < source.length && isBlank(source.charCodeAt(j))) j++; |
| 211 | const end = wordEnd(source, j); |
| 212 | return end < 0 ? '' : source.slice(j, end); |
| 213 | } |
| 214 | |
| 215 | /** Past the bracket group opening at `i`, strings and comments inside skipped; -1 when it doesn't close. */ |
| 216 | function groupEnd(source: string, i: number, open: number, close: number): number { |
no test coverage detected