Quick fix for binary expr codegen. Add uv hint
This commit is contained in:
@@ -386,6 +386,7 @@ emit_node :: (state : *Codegen_State, node : *AST_Node, indentation : int) {
|
||||
}
|
||||
case .Binary; {
|
||||
indent(*state.builder, indentation);
|
||||
append(*state.builder, "(");
|
||||
lhs := node.children[0];
|
||||
rhs := node.children[1];
|
||||
emit_node(state, lhs, 0);
|
||||
@@ -394,6 +395,7 @@ emit_node :: (state : *Codegen_State, node : *AST_Node, indentation : int) {
|
||||
emit_operator(state, node.token.kind);
|
||||
append(*state.builder, " ");
|
||||
emit_node(state, rhs, 0);
|
||||
append(*state.builder, ")");
|
||||
}
|
||||
case .Unary; {
|
||||
assert(false, "Not implemented yet: unary");
|
||||
|
||||
Reference in New Issue
Block a user