@@ -101,8 +101,8 @@ static const char *literal_from_first_child(CBMExtractCtx *ctx, TSNode node) {
101101 * const table per file is sufficient for the common Socket.IO pattern). */
102102static void scan_string_consts_js (CBMExtractCtx * ctx , chan_const_table_t * tbl ) {
103103 TSNodeStack stack ;
104- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
105- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
104+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
105+ ts_nstack_push (& stack , ctx -> root );
106106
107107 while (stack .count > 0 && tbl -> count < CHAN_CONST_CAP ) {
108108 TSNode node = ts_nstack_pop (& stack );
@@ -128,15 +128,15 @@ static void scan_string_consts_js(CBMExtractCtx *ctx, chan_const_table_t *tbl) {
128128 }
129129 }
130130
131- ts_nstack_push_children (& stack , ctx -> arena , node );
131+ ts_nstack_push_children (& stack , node );
132132 }
133133}
134134
135135/* Python constant resolution: NAME = "value" (assignment node). */
136136static void scan_string_consts_python (CBMExtractCtx * ctx , chan_const_table_t * tbl ) {
137137 TSNodeStack stack ;
138- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
139- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
138+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
139+ ts_nstack_push (& stack , ctx -> root );
140140
141141 while (stack .count > 0 && tbl -> count < CHAN_CONST_CAP ) {
142142 TSNode node = ts_nstack_pop (& stack );
@@ -163,7 +163,7 @@ static void scan_string_consts_python(CBMExtractCtx *ctx, chan_const_table_t *tb
163163
164164 uint32_t count = ts_node_child_count (node );
165165 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
166- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
166+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
167167 }
168168 }
169169}
@@ -373,15 +373,15 @@ static void extract_channels_js(CBMExtractCtx *ctx) {
373373
374374 /* Second pass: walk the tree looking for call_expression nodes. */
375375 TSNodeStack stack ;
376- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
377- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
376+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
377+ ts_nstack_push (& stack , ctx -> root );
378378
379379 while (stack .count > 0 ) {
380380 TSNode node = ts_nstack_pop (& stack );
381381 if (strcmp (ts_node_type (node ), "call_expression" ) == 0 ) {
382382 js_process_call (ctx , node , & consts );
383383 }
384- ts_nstack_push_children (& stack , ctx -> arena , node );
384+ ts_nstack_push_children (& stack , node );
385385 }
386386}
387387
@@ -549,8 +549,8 @@ static void extract_channels_python(CBMExtractCtx *ctx) {
549549 scan_string_consts_python (ctx , & consts );
550550
551551 TSNodeStack stack ;
552- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
553- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
552+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
553+ ts_nstack_push (& stack , ctx -> root );
554554
555555 while (stack .count > 0 ) {
556556 TSNode node = ts_nstack_pop (& stack );
@@ -562,7 +562,7 @@ static void extract_channels_python(CBMExtractCtx *ctx) {
562562 }
563563 uint32_t count = ts_node_child_count (node );
564564 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
565- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
565+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
566566 }
567567 }
568568}
@@ -627,8 +627,8 @@ static void go_process_call(CBMExtractCtx *ctx, TSNode call) {
627627
628628static void extract_channels_go (CBMExtractCtx * ctx ) {
629629 TSNodeStack stack ;
630- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
631- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
630+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
631+ ts_nstack_push (& stack , ctx -> root );
632632
633633 while (stack .count > 0 ) {
634634 TSNode node = ts_nstack_pop (& stack );
@@ -637,7 +637,7 @@ static void extract_channels_go(CBMExtractCtx *ctx) {
637637 }
638638 uint32_t count = ts_node_child_count (node );
639639 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
640- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
640+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
641641 }
642642 }
643643}
@@ -724,8 +724,8 @@ static void java_process_annotation(CBMExtractCtx *ctx, TSNode annotation) {
724724
725725static void extract_channels_java (CBMExtractCtx * ctx ) {
726726 TSNodeStack stack ;
727- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
728- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
727+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
728+ ts_nstack_push (& stack , ctx -> root );
729729
730730 while (stack .count > 0 ) {
731731 TSNode node = ts_nstack_pop (& stack );
@@ -737,7 +737,7 @@ static void extract_channels_java(CBMExtractCtx *ctx) {
737737 }
738738 uint32_t count = ts_node_child_count (node );
739739 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
740- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
740+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
741741 }
742742 }
743743}
@@ -793,8 +793,8 @@ static void csharp_process_call(CBMExtractCtx *ctx, TSNode call) {
793793
794794static void extract_channels_csharp (CBMExtractCtx * ctx ) {
795795 TSNodeStack stack ;
796- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
797- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
796+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
797+ ts_nstack_push (& stack , ctx -> root );
798798
799799 while (stack .count > 0 ) {
800800 TSNode node = ts_nstack_pop (& stack );
@@ -803,7 +803,7 @@ static void extract_channels_csharp(CBMExtractCtx *ctx) {
803803 }
804804 uint32_t count = ts_node_child_count (node );
805805 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
806- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
806+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
807807 }
808808 }
809809}
@@ -856,8 +856,8 @@ static void ruby_process_call(CBMExtractCtx *ctx, TSNode call) {
856856
857857static void extract_channels_ruby (CBMExtractCtx * ctx ) {
858858 TSNodeStack stack ;
859- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
860- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
859+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
860+ ts_nstack_push (& stack , ctx -> root );
861861
862862 while (stack .count > 0 ) {
863863 TSNode node = ts_nstack_pop (& stack );
@@ -866,7 +866,7 @@ static void extract_channels_ruby(CBMExtractCtx *ctx) {
866866 }
867867 uint32_t count = ts_node_child_count (node );
868868 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
869- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
869+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
870870 }
871871 }
872872}
@@ -958,8 +958,8 @@ static void elixir_process_function_def(CBMExtractCtx *ctx, TSNode func_def) {
958958
959959static void extract_channels_elixir (CBMExtractCtx * ctx ) {
960960 TSNodeStack stack ;
961- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
962- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
961+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
962+ ts_nstack_push (& stack , ctx -> root );
963963
964964 while (stack .count > 0 ) {
965965 TSNode node = ts_nstack_pop (& stack );
@@ -971,7 +971,7 @@ static void extract_channels_elixir(CBMExtractCtx *ctx) {
971971 }
972972 uint32_t count = ts_node_child_count (node );
973973 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
974- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
974+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
975975 }
976976 }
977977}
@@ -1034,8 +1034,8 @@ static void rust_process_call(CBMExtractCtx *ctx, TSNode call) {
10341034
10351035static void extract_channels_rust (CBMExtractCtx * ctx ) {
10361036 TSNodeStack stack ;
1037- ts_nstack_init (& stack , ctx -> arena , CHAN_STACK_CAP );
1038- ts_nstack_push (& stack , ctx -> arena , ctx -> root );
1037+ ts_nstack_init (& stack , ctx , CHAN_STACK_CAP );
1038+ ts_nstack_push (& stack , ctx -> root );
10391039
10401040 while (stack .count > 0 ) {
10411041 TSNode node = ts_nstack_pop (& stack );
@@ -1044,7 +1044,7 @@ static void extract_channels_rust(CBMExtractCtx *ctx) {
10441044 }
10451045 uint32_t count = ts_node_child_count (node );
10461046 for (int i = (int )count - SKIP_ONE ; i >= 0 ; i -- ) {
1047- ts_nstack_push (& stack , ctx -> arena , ts_node_child (node , (uint32_t )i ));
1047+ ts_nstack_push (& stack , ts_node_child (node , (uint32_t )i ));
10481048 }
10491049 }
10501050}
0 commit comments