(node: SyntaxNode)
| 1531 | } |
| 1532 | |
| 1533 | function pyOperator(node: SyntaxNode): string { |
| 1534 | const field = node.childForFieldName('operator'); |
| 1535 | if (field) return field.text; |
| 1536 | for (let i = 0; i < node.childCount; i++) { |
| 1537 | const c = node.child(i)!; |
| 1538 | if (!c.isNamed && (c.text === 'and' || c.text === 'or')) return c.text; |
| 1539 | } |
| 1540 | return ''; |
| 1541 | } |
| 1542 | |
| 1543 | const PYTHON: Rules = { |
| 1544 | boundaries: new Set(['function_definition', 'class_definition', 'module']), |