fix(lib): correct various typos

This commit is contained in:
Will Lillis 2026-03-28 03:43:51 -04:00
parent 9a48405a87
commit 0535b0ca37
4 changed files with 11 additions and 11 deletions

View file

@ -564,7 +564,7 @@ bool ts_node_is_missing(TSNode self);
/**
* Check if the node is *extra*. Extra nodes represent things like comments,
* which are not required the grammar, but can appear anywhere.
* which are not required by the grammar, but can appear anywhere.
*/
bool ts_node_is_extra(TSNode self);
@ -995,7 +995,7 @@ const char *ts_query_capture_name_for_id(
);
/**
* Get the quantifier of the query's captures. Each capture is * associated
* Get the quantifier of the query's captures. Each capture is associated
* with a numeric id based on the order that it appeared in the query's source.
*/
TSQuantifier ts_query_capture_quantifier_for_id(
@ -1041,7 +1041,7 @@ void ts_query_disable_pattern(TSQuery *self, uint32_t pattern_index);
* captures that appear *before* some of the captures from a previous match.
* 2. Repeatedly call [`ts_query_cursor_next_capture`] to iterate over all of the
* individual *captures* in the order that they appear. This is useful if
* don't care about which pattern matched, and just want a single ordered
* you don't care about which pattern matched, and just want a single ordered
* sequence of captures.
*
* If you don't care about consuming all of the results, you can stop calling
@ -1171,9 +1171,9 @@ bool ts_query_cursor_next_capture(
*
* The zero max start depth value can be used as a special behavior and
* it helps to destructure a subtree by staying on a node and using captures
* for interested parts. Note that the zero max start depth only limit a search
* for interested parts. Note that the zero max start depth only limits a search
* depth for a pattern's root node but other nodes that are parts of the pattern
* may be searched at any depth what defined by the pattern structure.
* may be searched at any depth as defined by the pattern structure.
*
* Set to `UINT32_MAX` to remove the maximum start depth.
*/
@ -1252,7 +1252,7 @@ const char *ts_language_symbol_name(const TSLanguage *self, TSSymbol symbol);
/**
* Check whether the given node type id belongs to named nodes, anonymous nodes,
* or a hidden nodes.
* or hidden nodes.
*
* See also [`ts_node_is_named`]. Hidden nodes are never returned from the API.
*/

View file

@ -163,7 +163,7 @@ static inline bool ts_lookahead_iterator__next(LookaheadIterator *self) {
} while (!self->table_value);
}
// Depending on if the symbols is terminal or non-terminal, the table value either
// Depending on if the symbol is terminal or non-terminal, the table value either
// represents a list of actions or a successor state.
if (self->symbol < self->language->token_count) {
const TSParseActionEntry *entry = &self->language->parse_actions[self->table_value];

View file

@ -185,7 +185,7 @@ typedef struct {
* step must be matched by the very next sibling. This is used when
* processing repetitions, or when processing a wildcard node followed by
* an anchor.
* - `has_in_progress_alternatives` - A flag that indicates that there is are
* - `has_in_progress_alternatives` - A flag that indicates that there are
* other states that have the same captures as this state, but are at
* different steps in their pattern. This means that in order to obey the
* 'longest-match' rule, this state should not be returned as a match until

View file

@ -519,7 +519,7 @@ MutableSubtree ts_subtree_new_node(
// Create a new error node containing the given children.
//
// This node is treated as 'extra'. Its children are prevented from having
// having any effect on the parse state.
// any effect on the parse state.
Subtree ts_subtree_new_error_node(
SubtreeArray *children,
bool extra,
@ -535,7 +535,7 @@ Subtree ts_subtree_new_error_node(
// Create a new 'missing leaf' node.
//
// This node is treated as 'extra'. Its children are prevented from having
// having any effect on the parse state.
// any effect on the parse state.
Subtree ts_subtree_new_missing_leaf(
SubtreePool *pool,
TSSymbol symbol,
@ -758,7 +758,7 @@ Subtree ts_subtree_edit(Subtree self, const TSInputEdit *input_edit, SubtreePool
};
// Interpret all inserted text as applying to the *first* child that touches the edit.
// Subsequent children are only never have any text inserted into them; they are only
// Subsequent children never have any text inserted into them; they are only
// shrunk to compensate for the edit.
if (
child_right.bytes > edit.start.bytes ||