File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 11from pathlib import Path
22
33from clang_bind .cmake_frontend import CMakeFileAPI
4+ from clang_bind .parse import Parse
45
56
67class Bind :
@@ -76,3 +77,19 @@ def _set_inclusion_sources(self):
7677 sources = CMakeFileAPI (self .build_dir ).get_sources (module )
7778 cpp_sources = list (filter (lambda x : x .endswith (".cpp" ), sources ))
7879 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 ()
You can’t perform that action at this time.
0 commit comments