diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-06-13 21:49:06 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-06-13 21:49:06 +0200 |
| commit | e76009bff1dc9ff544fd4e7dd18d5ffa0b0af424 (patch) | |
| tree | 461292763b8fcd6e3057355e54fe5b379eb61d16 | |
| parent | fd568075da8bf95ca37159454f37e085d5134b1d (diff) | |
odinfmt: Fix more regression errors
| -rw-r--r-- | src/odin/printer/visit.odin | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin index 0b56150..24c8264 100644 --- a/src/odin/printer/visit.odin +++ b/src/odin/printer/visit.odin @@ -969,7 +969,7 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, called_from: Expr_Called_Type = document = cons_with_nopl(document, text_token(p, v.op2)) document = cons_with_nopl(document, visit_expr(p, v.y)) } else { - document := visit_expr(p, v.cond) + document = visit_expr(p, v.cond) document = cons_with_nopl(document, text_token(p, v.op1)) document = cons_with_nopl(document, visit_expr(p, v.x)) document = cons_with_nopl(document, text_token(p, v.op2)) @@ -993,9 +993,9 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, called_from: Expr_Called_Type = document = cons(document, visit_exprs(p, v.call.args, {.Add_Comma})) document = cons(document, text(")")) case ^Ellipsis: - return cons(text(".."), visit_expr(p, v.expr)) + document = cons(text(".."), visit_expr(p, v.expr)) case ^Relative_Type: - return cons_with_opl(visit_expr(p, v.tag), visit_expr(p, v.type)) + document = cons_with_opl(visit_expr(p, v.tag), visit_expr(p, v.type)) case ^Slice_Expr: document = visit_expr(p, v.expr) document = cons(document, text("[")) @@ -1118,7 +1118,6 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, called_from: Expr_Called_Type = set_source_position(p, v.end) case ^Proc_Lit: - document = empty() switch v.inlining { case .None: case .Inline: |