Commit e25937b2 authored by Benoît Simonneaux's avatar Benoît Simonneaux

compiler/parser: Add instr_decl_debug_data().

parent e44b3759
Pipeline #421 passed with stages
in 1 minute and 46 seconds
......@@ -66,6 +66,15 @@ static int instr_decl_dtor(struct bm_ast_node *node)
return destroy_decl(&node->data.as_instr_decl.base);
}
static int instr_decl_debug_data(const struct bm_ast_node *node, int indent_lvl)
{
const struct bm_ast_node_data_instr_decl *data = &node->data.as_instr_decl;
debug_decl(&data->base, indent_lvl);
return 0;
}
/* Handles decl_assign too. */
static int parse_instr_decl(struct parser_ctx *ctx, unsigned long *cur_tok_id, struct bm_ast_node *out)
{
......@@ -75,6 +84,7 @@ static int parse_instr_decl(struct parser_ctx *ctx, unsigned long *cur_tok_id, s
parser_node_init(&decl, BM_AST_NODE_INSTR_DECL);
decl.dtor = instr_decl_dtor;
decl.debug_data = instr_decl_debug_data;
result = parse_decl(ctx, &i, &decl.data.as_instr_decl.base);
if (result < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment