Coverage for call_graph / parsers / base.py: 80%

10 statements  

« prev     ^ index     » next       coverage.py v7.13.3, created at 2026-02-08 15:04 -0800

1"""Base class for call graph parsers.""" 

2 

3from __future__ import annotations 

4 

5from abc import ABC, abstractmethod 

6from typing import TYPE_CHECKING 

7 

8if TYPE_CHECKING: 

9 from tree_sitter import Node 

10 

11 

12class CallGraphParser(ABC): 

13 @abstractmethod 

14 def extract_function_definitions(self, root, source, filepath): 

15 pass 

16 

17 @abstractmethod 

18 def extract_calls(self, root, source, filepath, all_functions): 

19 pass