(text: str)
| 117 | |
| 118 | |
| 119 | def _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*\(") |