Add --dot flag to parse subcommand, for printing tree as DOT graph

This commit is contained in:
Max Brunsfeld 2023-02-13 12:33:34 -08:00
parent 8389ffd2a1
commit 97fd990822
10 changed files with 106 additions and 43 deletions

View file

@ -346,6 +346,9 @@ extern "C" {
pub fn ts_tree_language(arg1: *const TSTree) -> *const TSLanguage;
}
extern "C" {
#[doc = " Get the array of included ranges that was used to parse the syntax tree."]
#[doc = ""]
#[doc = " The returned pointer must be freed by the caller."]
pub fn ts_tree_included_ranges(arg1: *const TSTree, length: *mut u32) -> *mut TSRange;
}
extern "C" {
@ -375,6 +378,10 @@ extern "C" {
length: *mut u32,
) -> *mut TSRange;
}
extern "C" {
#[doc = " Write a DOT graph describing the syntax tree to the given file."]
pub fn ts_tree_print_dot_graph(arg1: *const TSTree, file_descriptor: ::std::os::raw::c_int);
}
extern "C" {
#[doc = " Get the node's type as a null-terminated string."]
pub fn ts_node_type(arg1: TSNode) -> *const ::std::os::raw::c_char;