Fix docs for ts_node_is_extra

Fixes #446
This commit is contained in:
Max Brunsfeld 2019-11-05 09:49:16 -08:00
parent a506ceec3f
commit a7824cf59d
2 changed files with 9 additions and 9 deletions

View file

@ -330,21 +330,21 @@ extern "C" {
pub fn ts_tree_edit(self_: *mut TSTree, edit: *const TSInputEdit);
}
extern "C" {
#[doc = " Compare a new syntax tree to a previous syntax tree representing the same"]
#[doc = " Compare an old edited syntax tree to a new syntax tree representing the same"]
#[doc = " document, returning an array of ranges whose syntactic structure has changed."]
#[doc = ""]
#[doc = " For this to work correctly, the old syntax tree must have been edited such"]
#[doc = " that its ranges match up to the new tree. Generally, you\'ll want to call"]
#[doc = " this function right after calling one of the `ts_parser_parse` functions,"]
#[doc = " passing in the new tree that was returned from `ts_parser_parse` and the old"]
#[doc = " tree that was passed as a parameter."]
#[doc = " this function right after calling one of the `ts_parser_parse` functions."]
#[doc = " You need to pass the old tree that was passed to parse, as well as the new"]
#[doc = " tree that was returned from that function."]
#[doc = ""]
#[doc = " The returned array is allocated using `malloc` and the caller is responsible"]
#[doc = " for freeing it using `free`. The length of the array will be written to the"]
#[doc = " given `length` pointer."]
pub fn ts_tree_get_changed_ranges(
self_: *const TSTree,
old_tree: *const TSTree,
new_tree: *const TSTree,
length: *mut u32,
) -> *mut TSRange;
}
@ -401,8 +401,8 @@ extern "C" {
pub fn ts_node_is_missing(arg1: TSNode) -> bool;
}
extern "C" {
#[doc = " Check if the node is *missing*. Missing nodes are inserted by the parser in"]
#[doc = " order to recover from certain kinds of syntax errors."]
#[doc = " Check if the node is *extra*. Extra nodes represent things like comments,"]
#[doc = " which are not required the grammar, but can appear anywhere."]
pub fn ts_node_is_extra(arg1: TSNode) -> bool;
}
extern "C" {

View file

@ -442,8 +442,8 @@ bool ts_node_is_named(TSNode);
bool ts_node_is_missing(TSNode);
/**
* Check if the node is *missing*. Missing nodes are inserted by the parser in
* order to recover from certain kinds of syntax errors.
* Check if the node is *extra*. Extra nodes represent things like comments,
* which are not required the grammar, but can appear anywhere.
*/
bool ts_node_is_extra(TSNode);