Clean up
This commit is contained in:
parent
7f57098eb3
commit
905c9ce9a5
@ -141,17 +141,14 @@ namespace AST {
|
|||||||
|
|
||||||
auto lhs = this->m_lhs->codegen(builder, binop->lhs_lvalue ? lvalued : scope, allocator);
|
auto lhs = this->m_lhs->codegen(builder, binop->lhs_lvalue ? lvalued : scope, allocator);
|
||||||
auto rhs = this->m_rhs->codegen(builder, scope, allocator);
|
auto rhs = this->m_rhs->codegen(builder, scope, allocator);
|
||||||
try {
|
if (binop) {
|
||||||
if (binop) {
|
return codegen::StackValue{
|
||||||
return codegen::StackValue{
|
binop->codegen(builder, lhs.value, rhs.value),
|
||||||
binop->codegen(builder, lhs.value, rhs.value),
|
binop->result
|
||||||
binop->result
|
};
|
||||||
};
|
|
||||||
}
|
|
||||||
throw CompileError("invalid binop", this->m_meta);
|
|
||||||
}
|
}
|
||||||
catch (std::runtime_error& error) {
|
else {
|
||||||
throw CompileError(error.what(), this->m_meta);
|
throw CompileError("invalid binop", this->m_meta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user