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 1
1
from pathlib import Path
2
2
3
3
from clang_bind .cmake_frontend import CMakeFileAPI
4
+ from clang_bind .parse import Parse
4
5
5
6
6
7
class Bind :
@@ -76,3 +77,19 @@ def _set_inclusion_sources(self):
76
77
sources = CMakeFileAPI (self .build_dir ).get_sources (module )
77
78
cpp_sources = list (filter (lambda x : x .endswith (".cpp" ), sources ))
78
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 ()
You can’t perform that action at this time.
0 commit comments