lang: fix lots of compiler warnings/errors

This commit is contained in:
2024-12-01 13:25:36 +00:00
parent bb34e46c69
commit b5cb87e8df
8 changed files with 90 additions and 52 deletions

View File

@@ -1,8 +1,8 @@
#include "block.h"
#include "ctx.h"
#include "iterate.h"
#include "ivy/status.h"
#include "node.h"
#include "block.h"
#include "iterate.h"
#include <blue/object/string.h>
#include <ivy/lang/lex.h>
@@ -37,7 +37,8 @@ static struct token_parse_result parse_linefeed(
return PARSE_RESULT(IVY_ERR_BAD_SYNTAX, 0);
}
struct block_parser_state *block_state = (struct block_parser_state *)parser_push_state(ctx, IVY_AST_BLOCK);
struct block_parser_state *block_state
= (struct block_parser_state *)parser_push_state(ctx, IVY_AST_BLOCK);
block_state->s_terminator = IVY_SYM_BANG;
return PARSE_RESULT(IVY_OK, 0);
@@ -56,7 +57,6 @@ static struct token_parse_result parse_bang(
return PARSE_RESULT(IVY_ERR_BAD_SYNTAX, 0);
}
parser_pop_state(ctx, STATE_ADD_NODE_TO_PARENT);
return PARSE_RESULT(IVY_OK, 0);
}
@@ -112,7 +112,7 @@ static void collect_children(
{
struct ivy_ast_msgh_node *msgh = (struct ivy_ast_msgh_node *)node;
ast_node_iterator_enqueue_node(iterator, node, &msgh->n_sel->n_base);
ast_node_iterator_enqueue_node(iterator, node, &msgh->n_body->n_base);
ast_node_iterator_enqueue_node(iterator, node, msgh->n_body);
}
struct ast_node_type msgh_node_ops = {