parsers.kotlin

Kotlin regex-based parser. Extracts classes, interfaces, objects, data classes, and functions from Kotlin source files.

📄 /home/runner/work/autoredocs/autoredocs/src/autoredocs/parsers/kotlin.py

Classes

class
class KotlinParser(BaseParser)
Regex-based parser for Kotlin source files.
📍 Line 71

Methods

def
def parse_file(self, filepath: str | Path) -> ModuleDoc | None
Parse a file and extract its documentation. Args: filepath: The path to the file to parse, as a string or a Path object. Returns: A ModuleDoc object representing the parsed file, or None if the file does not exist or cannot be read. Raises: None
def
def _extract_methods(self, source: str, body_start: int) -> list[FunctionDoc]

Functions

def
def _extract_brace_body(source: str, start: int) -> str
📍 Line 187
def
def _build_kdoc_map(source: str) -> dict[int, str]
📍 Line 199
def
def _clean_kdoc(raw: str) -> str
📍 Line 208
def
def _parse_kotlin_params(raw: str) -> list[ArgInfo]
📍 Line 223