Coverage for src/rejuvenation/cpp_clang_lst_example.py: 0%
6 statements
« prev ^ index » next coverage.py v7.17.0, created at 2026-11-16 16:04 +0000
« prev ^ index » next coverage.py v7.17.0, created at 2026-11-16 16:04 +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: Example script demonstrating parsing and visualizing C++ source with the Clang LST adapter."""
9import clang
11from renaissance.integrations.clang.clang_adapter import ClangAdapter
12from renaissance.syntax_tree import ASTShower
14adapter = ClangAdapter(clang.__file__.replace("__init__.py", "native"))
15lst = adapter.parse("features/targets/cpp_example.cpp")
17ASTShower.show_node(lst.root)