(nodeType: string | undefined)
| 211 | */ |
| 212 | const DANGEROUS_TYPE_IDS = [...DANGEROUS_TYPES] |
| 213 | export function nodeTypeId(nodeType: string | undefined): number { |
| 214 | if (!nodeType) return -2 |
| 215 | if (nodeType === 'ERROR') return -1 |
| 216 | const i = DANGEROUS_TYPE_IDS.indexOf(nodeType) |
| 217 | return i >= 0 ? i + 1 : 0 |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Redirect operator tokens → canonical operator. tree-sitter produces these |
no outgoing calls
no test coverage detected