Coverage for src/renaissance/syntax_tree/__init__.py: 100%

13 statements  

« prev     ^ index     » next       coverage.py v7.16.1, created at 2026-10-02 13:12 +0000

1"""AI: Language-agnostic AST abstraction layer (finder, rewriter, processor) used by all parser integrations.""" 

2 

3from renaissance.utils.text_utils import TextUtils 

4 

5from .ast_factory import ASTFactory 

6from .ast_finder import ASTFinder 

7from .ast_node import ASTNode, ASTReference, VisitorResult 

8from .ast_processor import ASTProcessor 

9from .ast_refactor_actions import ASTRefactorActions 

10from .ast_rewriter import ASTRewriter 

11from .ast_shower import ASTShower 

12from .batch_ast_processor import ( 

13 AST_FACTORY_AND_ATU, 

14 Action, 

15 BatchASTProcessor, 

16 IterableProvider, 

17) 

18from .match_finder import MatchFinder, PatternMatch 

19from .recipe_ast_processor import ( 

20 RecipeASTProcessor, 

21 after_step, 

22 final_action, 

23 recipe_step, 

24) 

25 

26# isort: split 

27# This import must come after the ones above: renaissance.integrations.clang (imported via 

28# cpp_utils) imports back from renaissance.syntax_tree (ASTFinder, ASTNode, 

29# ASTReference), so those names must already be bound in this module's namespace 

30# before cpp_utils is loaded, or the circular import fails. 

31from renaissance.integrations.clang.cpp_utils import CPPUtils 

32 

33__all__ = [ 

34 "AST_FACTORY_AND_ATU", 

35 "ASTFactory", 

36 "ASTFinder", 

37 "ASTNode", 

38 "ASTProcessor", 

39 "ASTRefactorActions", 

40 "ASTReference", 

41 "ASTRewriter", 

42 "ASTShower", 

43 "Action", 

44 "BatchASTProcessor", 

45 "CPPUtils", 

46 "IterableProvider", 

47 "MatchFinder", 

48 "PatternMatch", 

49 "RecipeASTProcessor", 

50 "TextUtils", 

51 "VisitorResult", 

52 "after_step", 

53 "final_action", 

54 "recipe_step", 

55]