fix: rename shadowed variables from -Wshadow warnings and apply some useful clang-tidy warnings

This commit is contained in:
Amaan Qureshi 2023-07-04 00:43:58 -04:00
parent 9e99789e4c
commit 13f6ec2b0c
No known key found for this signature in database
GPG key ID: E67890ADC4227273
15 changed files with 190 additions and 190 deletions

View file

@ -776,7 +776,7 @@ uint32_t ts_query_start_byte_for_pattern(const TSQuery *, uint32_t);
const TSQueryPredicateStep *ts_query_predicates_for_pattern(
const TSQuery *self,
uint32_t pattern_index,
uint32_t *length
uint32_t *step_count
);
/*
@ -807,7 +807,7 @@ bool ts_query_is_pattern_guaranteed_at_step(const TSQuery *self, uint32_t byte_o
*/
const char *ts_query_capture_name_for_id(
const TSQuery *,
uint32_t id,
uint32_t index,
uint32_t *length
);
@ -817,13 +817,13 @@ const char *ts_query_capture_name_for_id(
*/
TSQuantifier ts_query_capture_quantifier_for_id(
const TSQuery *,
uint32_t pattern_id,
uint32_t capture_id
uint32_t pattern_index,
uint32_t capture_index
);
const char *ts_query_string_value_for_id(
const TSQuery *,
uint32_t id,
uint32_t index,
uint32_t *length
);
@ -907,7 +907,7 @@ void ts_query_cursor_set_point_range(TSQueryCursor *, TSPoint, TSPoint);
* Otherwise, return `false`.
*/
bool ts_query_cursor_next_match(TSQueryCursor *, TSQueryMatch *match);
void ts_query_cursor_remove_match(TSQueryCursor *, uint32_t id);
void ts_query_cursor_remove_match(TSQueryCursor *, uint32_t match_id);
/**
* Advance to the next capture of the currently running query.

View file

@ -166,7 +166,7 @@ struct TSLanguage {
* Parse Table Macros
*/
#define SMALL_STATE(id) id - LARGE_STATE_COUNT
#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT)
#define STATE(id) id
@ -176,7 +176,7 @@ struct TSLanguage {
{{ \
.shift = { \
.type = TSParseActionTypeShift, \
.state = state_value \
.state = (state_value) \
} \
}}
@ -184,7 +184,7 @@ struct TSLanguage {
{{ \
.shift = { \
.type = TSParseActionTypeShift, \
.state = state_value, \
.state = (state_value), \
.repetition = true \
} \
}}