Extract classes, methods, constructors, and imports from a .groovy/.gradle file. Falls back to a regex-based Spock extractor when tree-sitter-groovy cannot parse ``def "feature name"()`` methods (common in Spock specification classes).
(path: Path)
| 6449 | |
| 6450 | |
| 6451 | def extract_groovy(path: Path) -> dict: |
| 6452 | """Extract classes, methods, constructors, and imports from a .groovy/.gradle file. |
| 6453 | |
| 6454 | Falls back to a regex-based Spock extractor when tree-sitter-groovy cannot parse |
| 6455 | ``def "feature name"()`` methods (common in Spock specification classes). |
| 6456 | """ |
| 6457 | result = _extract_generic(path, _GROOVY_CONFIG) |
| 6458 | if _is_spock_file(path, result): |
| 6459 | result = _extract_spock_fallback(path, result) |
| 6460 | return result |
| 6461 | |
| 6462 | |
| 6463 | def extract_c(path: Path) -> dict: |