Files
agent/app/modules/rag/indexing/code/symbols/ast_parser.py
2026-03-01 14:21:33 +03:00

12 lines
229 B
Python

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