MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / _split_csv

Function _split_csv

Scripts/codegen/build_mjxmacro_snapshot.py:148–165  ·  view source on GitHub ↗

Split a comma-separated tuple body that may contain MJ_M(...) calls.

(tup: str)

Source from the content-addressed store, hash-verified

146
147
148def _split_csv(tup: str) -> List[str]:
149 """Split a comma-separated tuple body that may contain MJ_M(...) calls."""
150 parts: List[str] = []
151 depth = 0
152 cur: List[str] = []
153 for ch in tup:
154 if ch == "," and depth == 0:
155 parts.append("".join(cur).strip())
156 cur = []
157 continue
158 if ch == "(":
159 depth += 1
160 elif ch == ")":
161 depth -= 1
162 cur.append(ch)
163 if cur:
164 parts.append("".join(cur).strip())
165 return parts
166
167
168def _parse_pointer_entry(raw: str) -> Optional[Dict[str, Any]]:

Callers 2

_parse_pointer_entryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected