from __future__ import annotations

import ast


class PythonAstParser:
    def parse_module(self, text: str) -> ast.AST | None:
        try:
            return ast.parse(text)
        except SyntaxError:
            return None
