( source: string, index: number, )
| 188 | } |
| 189 | |
| 190 | function readIdentifier( |
| 191 | source: string, |
| 192 | index: number, |
| 193 | ): { value: string; end: number } | null { |
| 194 | const match = /^[A-Za-z_$][\w$]*/.exec(source.slice(index)); |
| 195 | if (!match) return null; |
| 196 | |
| 197 | return { |
| 198 | value: match[0], |
| 199 | end: index + match[0].length, |
| 200 | }; |
| 201 | } |
| 202 | |
| 203 | function findMatchingDelimiter( |
| 204 | source: string, |