Return the last path segment of an import string, recognizing the separators * used across languages: '.', '/', '\\', and "::". Returns a pointer into * `path` (no allocation). */
| 1483 | * used across languages: '.', '/', '\\', and "::". Returns a pointer into |
| 1484 | * `path` (no allocation). */ |
| 1485 | static const char *import_last_segment(const char *path) { |
| 1486 | const char *seg = path; |
| 1487 | for (const char *p = path; *p; p++) { |
| 1488 | if (*p == '.' || *p == '/' || *p == '\\' || *p == ':') { |
| 1489 | seg = p + 1; |
| 1490 | } |
| 1491 | } |
| 1492 | return seg; |
| 1493 | } |
| 1494 | |
| 1495 | /* Derive a representative imported symbol name from a raw module/use path, |
| 1496 | * stripping language decorations so it can be matched against an in-graph node: |
no outgoing calls
no test coverage detected