Coverage for src/renaissance/syntax_tree/__init__.py: 100%
13 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-15 10:34 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-15 10:34 +0000
1# Copyright (C) 2024-2026 TNO
2#
3# Licensed under the terms specified in the LICENSE file in the root directory
4# of this repository, also available at:
5# https://github.com/TNO/Renaissance.Py/blob/main/LICENSE
7"""AI: Language-agnostic AST abstraction layer (finder, rewriter, processor) used by all parser integrations."""
9from renaissance.utils.text_utils import TextUtils
11from .ast_factory import ASTFactory
12from .ast_finder import ASTFinder
13from .ast_node import ASTNode, ASTReference, VisitorResult
14from .ast_processor import ASTProcessor
15from .ast_refactor_actions import ASTRefactorActions
16from .ast_rewriter import ASTRewriter
17from .ast_shower import ASTShower
18from .batch_ast_processor import (
19 AST_FACTORY_AND_ATU,
20 Action,
21 BatchASTProcessor,
22 IterableProvider,
23)
24from .match_finder import MatchFinder, PatternMatch
25from .recipe_ast_processor import (
26 RecipeASTProcessor,
27 after_step,
28 final_action,
29 recipe_step,
30)
32# isort: split
33# This import must come after the ones above: renaissance.integrations.clang (imported via
34# cpp_utils) imports back from renaissance.syntax_tree (ASTFinder, ASTNode,
35# ASTReference), so those names must already be bound in this module's namespace
36# before cpp_utils is loaded, or the circular import fails.
37from renaissance.integrations.clang.cpp_utils import CPPUtils
39__all__ = [
40 "AST_FACTORY_AND_ATU",
41 "ASTFactory",
42 "ASTFinder",
43 "ASTNode",
44 "ASTProcessor",
45 "ASTRefactorActions",
46 "ASTReference",
47 "ASTRewriter",
48 "ASTShower",
49 "Action",
50 "BatchASTProcessor",
51 "CPPUtils",
52 "IterableProvider",
53 "MatchFinder",
54 "PatternMatch",
55 "RecipeASTProcessor",
56 "TextUtils",
57 "VisitorResult",
58 "after_step",
59 "final_action",
60 "recipe_step",
61]