Skip to content

Commit 19291d9

Browse files
committed
Initial commit
0 parents  commit 19291d9

26 files changed

+2591
-0
lines changed

README.md

Whitespace-only changes.

code_graph/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .analyzers.source_analyzer import *
2+
from .entities import *
3+
from .graph import Graph

code_graph/analyzers/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .source_analyzer import SourceAnalyzer

code_graph/analyzers/analyzer.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import io
2+
from pathlib import Path
3+
from abc import ABC, abstractmethod
4+
5+
class AbstractAnalyzer(ABC):
6+
@abstractmethod
7+
def first_pass(self, path: Path, f: io.TextIOWrapper) -> None:
8+
"""
9+
Perform the first pass of analysis on the given file.
10+
11+
Args:
12+
path (Path): The path to the file being processed.
13+
f (io.TextIOWrapper): The file object.
14+
"""
15+
16+
pass
17+
18+
@abstractmethod
19+
def second_pass(self, path: Path, f: io.TextIOWrapper) -> None:
20+
"""
21+
Perform a second pass analysis on the given source file.
22+
23+
Args:
24+
path (Path): The path to the file.
25+
f (io.TextIOWrapper): The file handle of the file to be processed.
26+
"""
27+
28+
pass
29+

0 commit comments

Comments
 (0)