From 0f26e1d204d3a3026ca3edfc4c6bd9638b2632e7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 31 Jul 2019 22:29:24 +0200 Subject: Add nullable, add bytecode documentation --- src/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler.c') diff --git a/src/compiler.c b/src/compiler.c index 8c3266c..524b555 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -34,7 +34,7 @@ static CHECK_RESULT int create_default_type(amal_compiler *compiler, const char return_if_error(arena_allocator_alloc(&compiler->allocator, sizeof(LhsExpr), (void**)lhs_expr)); lhsexpr_init(*lhs_expr, bool_true, bool_true, bool_true, create_buffer_view(name, strnlen(name, PATH_MAX))); - return_if_error(ast_create(&compiler->allocator, struct_decl, AST_STRUCT_DECL, &(*lhs_expr)->rhs_expr)); + return_if_error(ast_create(&compiler->allocator, struct_decl, AST_STRUCT_DECL, &nullable_raw((*lhs_expr)->rhs_expr))); return_if_error(ast_create(&compiler->allocator, *lhs_expr, AST_LHS, &expr)); expr->resolve_data.type = *lhs_expr; expr->resolve_data.status = AST_RESOLVED; -- cgit v1.2.3