TreeSitterFrontend.TreeSitterFFIFFI bindings to the bundled tree-sitter runtime and C grammar. Parses C source files directly without shelling out to the tree-sitter CLI.
type cst_node = {tag : string;node type, e.g. "function_definition", "identifier"
*)field : string option;field name in parent, e.g. "type", "declarator", "body"
*)srow : int;scol : int;erow : int;ecol : int;text : string;text content for leaf nodes
*)children : cst_node list;}Tree-sitter CST node, matching the structure produced by both the XML parser and the C FFI.
val parse_file : string -> cst_nodeParse a C source file and return the root CST node (translation_unit).
val pp_cst_node : Stdlib.Format.formatter -> ?indent:int -> cst_node -> unitPretty-print a CST node tree in S-expression style for debugging.