We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f43cc13 commit b5bac4fCopy full SHA for b5bac4f
1 file changed
clang_bind/bind.py
@@ -1,6 +1,7 @@
1
from pathlib import Path
2
3
from clang_bind.cmake_frontend import CMakeFileAPI
4
+from clang_bind.parse import Parse
5
6
7
class Bind:
@@ -76,3 +77,19 @@ def _set_inclusion_sources(self):
76
77
sources = CMakeFileAPI(self.build_dir).get_sources(module)
78
cpp_sources = list(filter(lambda x: x.endswith(".cpp"), sources))
79
self.inclusion_sources += list(set(sources) - set(cpp_sources))
80
+
81
+ def _parse(self):
82
+ """For all input files, get the parsed tree and update the db."""
83
+ for module_db in self.binding_db.values():
84
+ for db in module_db:
85
+ db.update(
86
+ {
87
+ "parsed_tree": Parse(
88
+ db.get("source_path"), self.inclusion_sources
89
+ ).get_tree()
90
+ }
91
+ )
92
93
+ def bind(self):
94
+ """Function to bind the input files."""
95
+ self._parse()
0 commit comments