parsers.csharp
C# regex-based parser. Extracts classes, interfaces, structs, enums, methods, and properties from C# source files using regular expressions.
Contents
Classes
class
class CSharpParser(BaseParser)
Regex-based parser for C# source files.
Methods
def
def parse_file(self, filepath: str | Path) -> ModuleDoc | None
Parse a C# source file and return a ModuleDoc.
def
def _extract_methods(self, source: str, body_start: int) -> list[FunctionDoc]
Extract methods from a class body.
Functions
def
def _extract_brace_body(source: str, start: int) -> str
Extract text from opening brace to matching close.
def
def _build_xmldoc_map(source: str) -> dict[int, str]
Map declaration positions to preceding /// XML doc comments.
def
def _clean_xmldoc(raw: str) -> str
Clean C# XML doc comment, extracting summary text.
def
def _parse_csharp_params(raw: str) -> list[ArgInfo]
Parse C# method parameters.