(node: Node)
| 409 | ] as const; |
| 410 | |
| 411 | function isInsideNonCodeContext(node: Node): boolean { |
| 412 | let cursor: Node | null = node; |
| 413 | let depth = 0; |
| 414 | while (cursor && depth < 40) { |
| 415 | const cursorType = cursor.type; |
| 416 | for (const fragment of NON_CODE_ANCESTOR_TYPE_FRAGMENTS) { |
| 417 | if (cursorType.includes(fragment)) { |
| 418 | return true; |
| 419 | } |
| 420 | } |
| 421 | cursor = cursor.parent; |
| 422 | depth += 1; |
| 423 | } |
| 424 | return false; |
| 425 | } |
| 426 | |
| 427 | /** |
| 428 | * Find identifier occurrences of `symbol` in `content` using Tree-sitter. |
no outgoing calls
no test coverage detected