Lines Matching refs:NCH
179 for (i = 0; i < NCH(n); i++) { in num_stmts()
190 return NCH(n) / 2; /* Divide by 2 to remove count of semi-colons */ in num_stmts()
192 if (NCH(n) == 1) in num_stmts()
196 for (i = 2; i < (NCH(n) - 1); i++) in num_stmts()
204 TYPE(n), NCH(n)); in num_stmts()
247 for (i = 0; i < NCH(n) - 1; i++) { in PyAST_FromNode()
306 for (i = 0; i < NCH(n); i += 2) { in PyAST_FromNode()
532 if (NCH(n) == 1) { in ast_for_comp_op()
558 else if (NCH(n) == 2) { in ast_for_comp_op()
573 NCH(n)); in ast_for_comp_op()
590 seq = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena); in seq_for_testlist()
594 for (i = 0; i < NCH(n); i += 2) { in seq_for_testlist()
610 int i, len = (NCH(n) + 1) / 2; in compiler_complex_args()
643 if (NCH(child) == 1) { in compiler_complex_args()
675 if (NCH(n) == 2) /* () as argument list */ in ast_for_arguments()
682 for (i = 0; i < NCH(n); i++) { in ast_for_arguments()
702 while (i < NCH(n)) { in ast_for_arguments()
711 if (i + 1 < NCH(n) && TYPE(CHILD(n, i + 1)) == EQUAL) { in ast_for_arguments()
731 if (NCH(ch) == 3) { in ast_for_arguments()
734 if (NCH(ch) != 1) { in ast_for_arguments()
823 for (i = 2; i < NCH(n); i+=2) { in ast_for_dotted_name()
850 if (NCH(n) == 3) { /* No arguments */ in ast_for_decorator()
854 else if (NCH(n) == 5) { /* Call with no arguments */ in ast_for_decorator()
879 decorator_seq = asdl_seq_new(NCH(n), c->c_arena); in ast_for_decorators()
883 for (i = 0; i < NCH(n); i++) { in ast_for_decorators()
956 if (NCH(n) == 3) { in ast_for_lambdef()
982 assert(NCH(n) == 5); in ast_for_ifexpr()
1015 if (NCH(ch) == 5) in count_list_fors()
1025 if (NCH(ch) == 3) { in count_list_fors()
1055 if (NCH(n) == 2) in count_list_ifs()
1076 assert(NCH(n) > 1); in ast_for_listcomp()
1111 if (NCH(for_ch) == 1) in ast_for_listcomp()
1120 if (NCH(ch) == 5) { in ast_for_listcomp()
1144 if (NCH(ch) == 3) in ast_for_listcomp()
1172 if (NCH(n) == 5) in count_comp_fors()
1182 if (NCH(n) == 3) { in count_comp_fors()
1213 if (NCH(n) == 2) in count_comp_ifs()
1252 if (NCH(for_ch) == 1) in ast_for_comprehension()
1261 if (NCH(n) == 5) { in ast_for_comprehension()
1283 if (NCH(n) == 3) in ast_for_comprehension()
1302 assert(NCH(n) > 1); in ast_for_itercomp()
1327 assert(NCH(n) > 3); in ast_for_dictcomp()
1429 if (NCH(ch) == 1 || TYPE(CHILD(ch, 1)) == COMMA) { in ast_for_atom()
1450 } else if (NCH(ch) == 1 || TYPE(CHILD(ch, 1)) == COMMA) { in ast_for_atom()
1453 size = (NCH(ch) + 1) / 2; /* +1 in case no trailing comma */ in ast_for_atom()
1457 for (i = 0; i < NCH(ch); i += 2) { in ast_for_atom()
1468 } else if (NCH(ch) > 3 && TYPE(CHILD(ch, 3)) == comp_for) { in ast_for_atom()
1472 size = (NCH(ch) + 1) / 4; /* +1 in case no trailing comma */ in ast_for_atom()
1481 for (i = 0; i < NCH(ch); i += 4) { in ast_for_atom()
1532 if (NCH(n) == 1 && TYPE(ch) == test) { in ast_for_slice()
1550 if (NCH(n) > 1) { in ast_for_slice()
1559 } else if (NCH(n) > 2) { in ast_for_slice()
1569 ch = CHILD(n, NCH(n) - 1); in ast_for_slice()
1571 if (NCH(ch) == 1) { in ast_for_slice()
1627 nops = (NCH(n) - 1) / 2; in ast_for_binop()
1659 if (NCH(n) == 2) in ast_for_trailer()
1676 if (NCH(n) == 1) { in ast_for_trailer()
1693 slices = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena); in ast_for_trailer()
1696 for (j = 0; j < NCH(n); j += 2) { in ast_for_trailer()
1740 NCH(n) == 2 && in ast_for_factor()
1742 NCH(pfactor) == 1 && in ast_for_factor()
1744 NCH(ppower) == 1 && in ast_for_factor()
1793 if (NCH(n) == 1) in ast_for_power()
1795 for (i = 1; i < NCH(n); i++) { in ast_for_power()
1806 if (TYPE(CHILD(n, NCH(n) - 1)) == factor) { in ast_for_power()
1807 expr_ty f = ast_for_expr(c, CHILD(n, NCH(n) - 1)); in ast_for_power()
1859 else if (NCH(n) > 1) in ast_for_expr()
1864 if (NCH(n) == 1) { in ast_for_expr()
1868 seq = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena); in ast_for_expr()
1871 for (i = 0; i < NCH(n); i += 2) { in ast_for_expr()
1883 if (NCH(n) == 1) { in ast_for_expr()
1896 if (NCH(n) == 1) { in ast_for_expr()
1904 ops = asdl_int_seq_new(NCH(n) / 2, c->c_arena); in ast_for_expr()
1907 cmps = asdl_seq_new(NCH(n) / 2, c->c_arena); in ast_for_expr()
1911 for (i = 1; i < NCH(n); i += 2) { in ast_for_expr()
1947 if (NCH(n) == 1) { in ast_for_expr()
1954 if (NCH(n) == 2) { in ast_for_expr()
1962 if (NCH(n) == 1) { in ast_for_expr()
1996 for (i = 0; i < NCH(n); i++) { in ast_for_call()
1999 if (NCH(ch) == 1) in ast_for_call()
2026 for (i = 0; i < NCH(n); i++) { in ast_for_call()
2030 if (NCH(ch) == 1) { in ast_for_call()
2120 assert(NCH(n) > 0); in ast_for_testlist()
2122 if (NCH(n) > 1) in ast_for_testlist()
2130 if (NCH(n) == 1) in ast_for_testlist()
2146 if (NCH(n) > 1 && TYPE(CHILD(n, 1)) == comp_for) in ast_for_testlist_comp()
2156 assert(NCH(n) > 0); in ast_for_class_bases()
2158 if (NCH(n) == 1) { in ast_for_class_bases()
2185 if (NCH(n) == 1) { in ast_for_expr_stmt()
2239 targets = asdl_seq_new(NCH(n) / 2, c->c_arena); in ast_for_expr_stmt()
2242 for (i = 0; i < NCH(n) - 2; i += 2) { in ast_for_expr_stmt()
2259 value = CHILD(n, NCH(n) - 1); in ast_for_expr_stmt()
2283 if (NCH(n) >= 2 && TYPE(CHILD(n, 1)) == RIGHTSHIFT) { in ast_for_print_stmt()
2289 values_count = (NCH(n) + 1 - start) / 2; in ast_for_print_stmt()
2294 for (i = start, j = 0; i < NCH(n); i += 2, ++j) { in ast_for_print_stmt()
2301 nl = (TYPE(CHILD(n, NCH(n) - 1)) == COMMA) ? false : true; in ast_for_print_stmt()
2314 seq = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena); in ast_for_exprlist()
2317 for (i = 0; i < NCH(n); i += 2) { in ast_for_exprlist()
2371 if (NCH(ch) == 1) in ast_for_flow_stmt()
2381 if (NCH(ch) == 1) in ast_for_flow_stmt()
2384 else if (NCH(ch) == 2) { in ast_for_flow_stmt()
2391 else if (NCH(ch) == 4) { in ast_for_flow_stmt()
2404 else if (NCH(ch) == 6) { in ast_for_flow_stmt()
2445 if (NCH(n) == 3) { in alias_for_import_name()
2463 if (NCH(n) == 1) { in alias_for_import_name()
2482 if (NCH(n) == 1) { in alias_for_import_name()
2498 for (i = 0; i < NCH(n); i += 2) in alias_for_import_name()
2508 for (i = 0; i < NCH(n); i += 2) { in alias_for_import_name()
2558 aliases = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena); in ast_for_import_stmt()
2561 for (i = 0; i < NCH(n); i += 2) { in ast_for_import_stmt()
2577 for (idx = 1; idx < NCH(n); idx++) { in ast_for_import_stmt()
2599 n_children = NCH(n); in ast_for_import_stmt()
2604 n_children = NCH(n); in ast_for_import_stmt()
2628 for (i = 0; i < NCH(n); i += 2) { in ast_for_import_stmt()
2655 s = asdl_seq_new(NCH(n) / 2, c->c_arena); in ast_for_global_stmt()
2658 for (i = 1; i < NCH(n); i += 2) { in ast_for_global_stmt()
2671 int n_children = NCH(n); in ast_for_exec_stmt()
2716 if (NCH(n) == 2) { in ast_for_assert_stmt()
2723 else if (NCH(n) == 4) { in ast_for_assert_stmt()
2737 NCH(n)); in ast_for_assert_stmt()
2761 end = NCH(n) - 1; in ast_for_suite()
2774 for (i = 2; i < (NCH(n) - 1); i++) { in ast_for_suite()
2789 for (j = 0; j < NCH(ch); j += 2) { in ast_for_suite()
2791 if (NCH(CHILD(ch, j)) == 0) { in ast_for_suite()
2792 assert((j + 1) == NCH(ch)); in ast_for_suite()
2817 if (NCH(n) == 4) { in ast_for_if_stmt()
2859 n_elif = NCH(n) - 4; in ast_for_if_stmt()
2875 expression = ast_for_expr(c, CHILD(n, NCH(n) - 6)); in ast_for_if_stmt()
2878 suite_seq = ast_for_suite(c, CHILD(n, NCH(n) - 4)); in ast_for_if_stmt()
2881 suite_seq2 = ast_for_suite(c, CHILD(n, NCH(n) - 1)); in ast_for_if_stmt()
2887 LINENO(CHILD(n, NCH(n) - 6)), in ast_for_if_stmt()
2888 CHILD(n, NCH(n) - 6)->n_col_offset, in ast_for_if_stmt()
2933 if (NCH(n) == 4) { in ast_for_while_stmt()
2946 else if (NCH(n) == 7) { in ast_for_while_stmt()
2966 NCH(n)); in ast_for_while_stmt()
2980 if (NCH(n) == 9) { in ast_for_for_stmt()
2993 if (NCH(node_target) == 1) in ast_for_for_stmt()
3016 if (NCH(exc) == 1) { in ast_for_except_clause()
3024 else if (NCH(exc) == 2) { in ast_for_except_clause()
3038 else if (NCH(exc) == 4) { in ast_for_except_clause()
3059 NCH(exc)); in ast_for_except_clause()
3066 const int nch = NCH(n); in ast_for_try_stmt()
3151 if (NCH(n) == 3) { in ast_for_with_item()
3177 i = NCH(n) - 1; in ast_for_with_stmt()
3213 if (NCH(n) == 4) { in ast_for_classdef()
3254 assert(NCH(n) == 1); in ast_for_stmt()
3289 TYPE(n), NCH(n)); in ast_for_stmt()
3319 TYPE(n), NCH(n)); in ast_for_stmt()
3562 for (i = 1; i < NCH(n); i++) { in parsestrplus()