style: correct typos
This commit is contained in:
parent
faf97b896a
commit
2a63077cac
7 changed files with 14 additions and 14 deletions
|
|
@ -545,7 +545,7 @@ extern "C" {
|
|||
pub fn ts_tree_cursor_goto_next_sibling(self_: *mut TSTreeCursor) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
#[doc = " Move the cursor to the previous sibling of its current node.\n\n This returns `true` if the cursor successfully moved, and returns `false` if\n there was no previous sibling node.\n\n Note, that this function may be slower than\n [`ts_tree_cursor_goto_next_sibling`] due to how node positions are stored. In\n the worst case, this will need to iterate through all the children upto the\n previous sibling node to recalculate its position."]
|
||||
#[doc = " Move the cursor to the previous sibling of its current node.\n\n This returns `true` if the cursor successfully moved, and returns `false` if\n there was no previous sibling node.\n\n Note, that this function may be slower than\n [`ts_tree_cursor_goto_next_sibling`] due to how node positions are stored. In\n the worst case, this will need to iterate through all the children up to the\n previous sibling node to recalculate its position."]
|
||||
pub fn ts_tree_cursor_goto_previous_sibling(self_: *mut TSTreeCursor) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
|
|
@ -681,7 +681,7 @@ extern "C" {
|
|||
pub fn ts_query_cursor_exec(self_: *mut TSQueryCursor, query: *const TSQuery, node: TSNode);
|
||||
}
|
||||
extern "C" {
|
||||
#[doc = " Start running a gievn query on a given node, with some options."]
|
||||
#[doc = " Start running a given query on a given node, with some options."]
|
||||
pub fn ts_query_cursor_exec_with_options(
|
||||
self_: *mut TSQueryCursor,
|
||||
query: *const TSQuery,
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ enum TextPredicateCapture {
|
|||
AnyString(u32, Box<[Box<str>]>, bool),
|
||||
}
|
||||
|
||||
// TODO: Remove this struct at at some point. If `core::str::lossy::Utf8Lossy`
|
||||
// TODO: Remove this struct at some point. If `core::str::lossy::Utf8Lossy`
|
||||
// is ever stabilized.
|
||||
pub struct LossyUtf8<'a> {
|
||||
bytes: &'a [u8],
|
||||
|
|
@ -2155,7 +2155,7 @@ impl<'cursor> TreeCursor<'cursor> {
|
|||
/// Note, that this function may be slower than
|
||||
/// [`goto_next_sibling`](TreeCursor::goto_next_sibling) due to how node
|
||||
/// positions are stored. In the worst case, this will need to iterate
|
||||
/// through all the children upto the previous sibling node to recalculate
|
||||
/// through all the children up to the previous sibling node to recalculate
|
||||
/// its position.
|
||||
#[doc(alias = "ts_tree_cursor_goto_previous_sibling")]
|
||||
pub fn goto_previous_sibling(&mut self) -> bool {
|
||||
|
|
@ -2445,7 +2445,7 @@ impl Query {
|
|||
}
|
||||
}
|
||||
|
||||
// Build a vector to store capture qunatifiers.
|
||||
// Build a vector to store capture quantifiers.
|
||||
for i in 0..pattern_count {
|
||||
let mut capture_quantifiers = Vec::with_capacity(capture_count as usize);
|
||||
for j in 0..capture_count {
|
||||
|
|
|
|||
|
|
@ -815,7 +815,7 @@ bool ts_tree_cursor_goto_next_sibling(TSTreeCursor *self);
|
|||
*
|
||||
* Note, that this function may be slower than
|
||||
* [`ts_tree_cursor_goto_next_sibling`] due to how node positions are stored. In
|
||||
* the worst case, this will need to iterate through all the children upto the
|
||||
* the worst case, this will need to iterate through all the children up to the
|
||||
* previous sibling node to recalculate its position.
|
||||
*/
|
||||
bool ts_tree_cursor_goto_previous_sibling(TSTreeCursor *self);
|
||||
|
|
@ -1044,7 +1044,7 @@ void ts_query_cursor_delete(TSQueryCursor *self);
|
|||
void ts_query_cursor_exec(TSQueryCursor *self, const TSQuery *query, TSNode node);
|
||||
|
||||
/**
|
||||
* Start running a gievn query on a given node, with some options.
|
||||
* Start running a given query on a given node, with some options.
|
||||
*/
|
||||
void ts_query_cursor_exec_with_options(
|
||||
TSQueryCursor *self,
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ typedef struct {
|
|||
} SymbolTable;
|
||||
|
||||
/**
|
||||
* CaptureQuantififers - a data structure holding the quantifiers of pattern captures.
|
||||
* CaptureQuantifiers - a data structure holding the quantifiers of pattern captures.
|
||||
*/
|
||||
typedef Array(uint8_t) CaptureQuantifiers;
|
||||
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@ Subtree ts_subtree_edit(Subtree self, const TSInputEdit *input_edit, SubtreePool
|
|||
|
||||
// Keep editing child nodes until a node is reached that starts after the edit.
|
||||
// Also, if this node's validity depends on its column position, then continue
|
||||
// invaliditing child nodes until reaching a line break.
|
||||
// invalidating child nodes until reaching a line break.
|
||||
if ((
|
||||
(child_left.bytes > edit.old_end.bytes) ||
|
||||
(child_left.bytes == edit.old_end.bytes && child_size.bytes > 0 && i > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue