@@ -143,8 +143,8 @@ typedef struct {
143143} PatternEntry ;
144144
145145typedef struct {
146- Slice steps ;
147- Slice predicate_steps ;
146+ Slice step ;
147+ Slice predicate_step ;
148148 uint32_t start_byte ;
149149 bool is_non_local ;
150150} QueryPattern ;
@@ -1782,8 +1782,8 @@ static bool ts_query__analyze_patterns(TSQuery *self, unsigned *error_offset) {
17821782 // Gather all of the captures that are used in predicates for this pattern.
17831783 array_clear (& predicate_capture_ids );
17841784 for (
1785- unsigned start = pattern -> predicate_steps .offset ,
1786- end = start + pattern -> predicate_steps .length ,
1785+ unsigned start = pattern -> predicate_step .offset ,
1786+ end = start + pattern -> predicate_step .length ,
17871787 j = start ; j < end ; j ++
17881788 ) {
17891789 TSQueryPredicateStep * step = & self -> predicate_steps .contents [j ];
@@ -1795,8 +1795,8 @@ static bool ts_query__analyze_patterns(TSQuery *self, unsigned *error_offset) {
17951795
17961796 // Find all of the steps that have these captures.
17971797 for (
1798- unsigned start = pattern -> steps .offset ,
1799- end = start + pattern -> steps .length ,
1798+ unsigned start = pattern -> step .offset ,
1799+ end = start + pattern -> step .length ,
18001800 j = start ; j < end ; j ++
18011801 ) {
18021802 QueryStep * step = & self -> steps .contents [j ];
@@ -2711,8 +2711,8 @@ TSQuery *ts_query_new(
27112711 uint32_t start_step_index = self -> steps .size ;
27122712 uint32_t start_predicate_step_index = self -> predicate_steps .size ;
27132713 array_push (& self -> patterns , ((QueryPattern ) {
2714- .steps = (Slice ) {.offset = start_step_index },
2715- .predicate_steps = (Slice ) {.offset = start_predicate_step_index },
2714+ .step = (Slice ) {.offset = start_step_index },
2715+ .predicate_step = (Slice ) {.offset = start_predicate_step_index },
27162716 .start_byte = stream_offset (& stream ),
27172717 .is_non_local = false,
27182718 }));
@@ -2721,8 +2721,8 @@ TSQuery *ts_query_new(
27212721 array_push (& self -> steps , query_step__new (0 , PATTERN_DONE_MARKER , false));
27222722
27232723 QueryPattern * pattern = array_back (& self -> patterns );
2724- pattern -> steps .length = self -> steps .size - start_step_index ;
2725- pattern -> predicate_steps .length = self -> predicate_steps .size - start_predicate_step_index ;
2724+ pattern -> step .length = self -> steps .size - start_step_index ;
2725+ pattern -> predicate_step .length = self -> predicate_steps .size - start_predicate_step_index ;
27262726
27272727 // If any pattern could not be parsed, then report the error information
27282728 // and terminate.
@@ -2865,7 +2865,7 @@ const TSQueryPredicateStep *ts_query_predicates_for_pattern(
28652865 uint32_t pattern_index ,
28662866 uint32_t * step_count
28672867) {
2868- Slice slice = self -> patterns .contents [pattern_index ].predicate_steps ;
2868+ Slice slice = self -> patterns .contents [pattern_index ].predicate_step ;
28692869 * step_count = slice .length ;
28702870 if (self -> predicate_steps .contents == NULL ) {
28712871 return NULL ;
0 commit comments