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

Function _strip_comments

Scripts/codegen/build_mjxmacro_snapshot.py:119–123  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

117
118
119def _strip_comments(text: str) -> str:
120 # Drop //... comments + /* ... */ blocks.
121 text = re.sub(r"//[^\n]*", "", text)
122 text = re.sub(r"/\*.*?\*/", "", text, flags=re.DOTALL)
123 return text
124
125
126_BODY_ENTRY_RE = re.compile(rf"^\s*{_X_TAG_RE}\s*\(")

Callers 1

parse_mjxmacroFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected