Module ClangFrontend.Capture
val run_clang : ClangCommand.t -> (IStdlib.IStd.In_channel.t -> 'a) -> 'aval capture : ClangCommand.t -> unitIf the command is detected to correspond to a source file, translate it.
- Given a compilation command, attach our
ASTExporterclang plugin to the command and run it. - Our clang plugin emits the AST (Abstract Syntax Tree) as Biniou data that we deserialize. The AST format is described in
Clang_ast_t(and its Biniou API is inClang_ast_b). - If enabled, invoke translation to
SilviaCFrontend. - If enabled, invoke linters callbacks from
ASTLanguage(see below). More on linters here: http://fbinfer.com/docs/linters.html.
- Given a compilation command, attach our
val al_callback_ref : (CFrontend_config.translation_unit_context -> ATDGenerated.Clang_ast_t.decl -> unit) IStdlib.IStd.refcallback set by AL to avoid circular dependencies between clang/ and al/ without having to expose the clang-only types involved all the way to integration/