MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _pascal_split_uses

Function _pascal_split_uses

graphify/extract.py:13143–13151  ·  view source on GitHub ↗

Split a uses list string, handling 'Foo in ''bar.pas''' syntax.

(s: str)

Source from the content-addressed store, hash-verified

13141
13142
13143def _pascal_split_uses(s: str) -> list[str]:
13144 """Split a uses list string, handling 'Foo in ''bar.pas''' syntax."""
13145 out = []
13146 for chunk in s.split(","):
13147 name = re.split(r"\s+in\s+", chunk.strip(), maxsplit=1, flags=re.IGNORECASE)[0]
13148 name = name.strip().strip(";")
13149 if name and re.match(r"[A-Za-z_][\w.]*$", name):
13150 out.append(name)
13151 return out
13152
13153
13154def _pascal_split_bases(s: str) -> list[str]:

Callers 1

_extract_pascal_regexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected