Add clone for ast.Ternary_If_Expr and ast.Ternary_When_Expr

This commit is contained in:
gingerBill
2020-03-07 21:41:27 +00:00
parent a83d9f59f6
commit 4cf70f360b
+10
View File
@@ -136,6 +136,16 @@ clone_node :: proc(node: ^Node) -> ^Node {
r.cond = clone(r.cond);
r.x = clone(r.x);
r.y = clone(r.y);
case Ternary_If_Expr:
r := cast(^Ternary_If_Expr)res;
r.x = clone(r.x);
r.cond = clone(r.cond);
r.y = clone(r.y);
case Ternary_When_Expr:
r := cast(^Ternary_When_Expr)res;
r.x = clone(r.x);
r.cond = clone(r.cond);
r.y = clone(r.y);
case Type_Assertion:
r := cast(^Type_Assertion)res;
r.expr = clone(r.expr);