lang: add missing includes; misc formatting cleanup

This commit is contained in:
2024-12-06 09:53:09 +00:00
parent 5fe3231c9e
commit d1855afc05
9 changed files with 131 additions and 88 deletions

View File

@@ -1,5 +1,6 @@
#include "ctx.h"
#include "../debug.h"
#include "node.h"
#include <blue/core/queue.h>
@@ -16,8 +17,9 @@ static void print_state_stack(struct ivy_parser *parser)
b_queue_foreach (&it, &parser->p_state) {
struct parser_state *state
= b_unbox(struct parser_state, it.entry, s_entry);
debug_printf(" %s\n",
ivy_ast_node_type_to_string(state->s_node->n_type));
debug_printf(
" %s\n",
ivy_ast_node_type_to_string(state->s_node->n_type));
}
}
#endif
@@ -97,7 +99,8 @@ struct parser_state *parser_get_state_generic(struct ivy_parser *parser)
return state;
}
struct parser_state *parser_get_parent_state_generic(struct ivy_parser *parser, enum ivy_ast_node_type type)
struct parser_state *parser_get_parent_state_generic(
struct ivy_parser *parser, enum ivy_ast_node_type type)
{
b_queue_entry *entry = b_queue_last(&parser->p_state);
if (!entry) {