Lines Matching refs:num_args
551 STATIC void push_result_rule(parser_t *parser, size_t src_line, uint8_t rule_id, size_t num_args);
554 STATIC bool fold_logical_constants(parser_t *parser, uint8_t rule_id, size_t *num_args) { in fold_logical_constants() argument
558 size_t copy_to = *num_args; in fold_logical_constants()
588 *num_args -= copy_to; in fold_logical_constants()
591 return *num_args == 1; in fold_logical_constants()
611 STATIC bool fold_constants(parser_t *parser, uint8_t rule_id, size_t num_args) { in fold_constants() argument
621 mp_parse_node_t pn = peek_result(parser, num_args - 1); in fold_constants()
635 for (ssize_t i = num_args - 2; i >= 0; --i) { in fold_constants()
651 mp_parse_node_t pn = peek_result(parser, num_args - 1); in fold_constants()
655 for (ssize_t i = num_args - 2; i >= 1; i -= 2) { in fold_constants()
784 for (size_t i = num_args; i > 0; i--) { in fold_constants()
798 STATIC void push_result_rule(parser_t *parser, size_t src_line, uint8_t rule_id, size_t num_args) { in push_result_rule() argument
814 if (fold_logical_constants(parser, rule_id, &num_args)) { in push_result_rule()
818 if (fold_constants(parser, rule_id, num_args)) { in push_result_rule()
824 …_t *pn = parser_alloc(parser, sizeof(mp_parse_node_struct_t) + sizeof(mp_parse_node_t) * num_args); in push_result_rule()
826 pn->kind_num_nodes = (rule_id & 0xff) | (num_args << 8); in push_result_rule()
827 for (size_t i = num_args; i > 0; i--) { in push_result_rule()