Started work on cleaning up dumping the AST. Lots still to do but... Split try expr further and fixed emit of statement.

This commit is contained in:
Christoffer Lerno
2020-05-06 22:23:53 +02:00
parent f62a094f75
commit 89ce6064e1
14 changed files with 340 additions and 257 deletions

View File

@@ -811,6 +811,11 @@ LLVMValueRef gencontext_emit_typeid(GenContext *context, Expr *expr)
LLVMValueRef gencontext_emit_try_expr(GenContext *context, Expr *expr)
{
if (expr->try_expr.type == TRY_STMT)
{
gencontext_emit_stmt(context, expr->try_expr.stmt);
return NULL;
}
if (expr->try_expr.type == TRY_EXPR_ELSE_EXPR)
{
LLVMBasicBlockRef else_block = gencontext_get_try_target(context, expr);