MCPcopy Create free account
hub / github.com/HKUDS/AutoAgent / __init__

Method __init__

autoagent/memory/code_tree/code_parser.py:22–31  ·  view source on GitHub ↗
(self, language: str, node_types: list[str], path_to_object_file: str)

Source from the content-addressed store, hash-verified

20 """Code Parser Class."""
21
22 def __init__(self, language: str, node_types: list[str], path_to_object_file: str):
23 self.node_types = node_types
24 self.language = language
25 try:
26 self.parser = tree_sitter.Parser()
27 self.parser.set_language(
28 tree_sitter.Language(f"{path_to_object_file}/my-languages.so", language)
29 )
30 except Exception as e:
31 logger.exception("failed to build %s parser: ", e)
32
33 def parse_file(self, content: str, filename: str):
34 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected