diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-07-30 02:47:11 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-07-30 02:47:11 +0200 |
| commit | 9ea6cb14bba72c01d16ba35f8ef697b90819a2ae (patch) | |
| tree | 2e52bc6c293ed2a11b1f7e4c565427182766dd0f /src | |
| parent | 992edc6330e07e5e63b867fc34ebf30250d6dabd (diff) | |
| parent | ce72f77b455afa6a7de26b74de4ca539aeffecd6 (diff) | |
Merge branch 'master' of github.com:DanielGavin/ols
Diffstat (limited to 'src')
| -rw-r--r-- | src/odin/printer/visit.odin | 4 | ||||
| -rw-r--r-- | src/server/analysis.odin | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin index 04d1ada..a76ab47 100644 --- a/src/odin/printer/visit.odin +++ b/src/odin/printer/visit.odin @@ -1045,9 +1045,9 @@ visit_expr :: proc(p: ^Printer, expr: ^ast.Expr, called_from: Expr_Called_Type = document = cons_with_opl(document, group(visit_expr(p, v.y))) } case ^Ternary_When_Expr: - document = visit_expr(p, v.cond) + document = visit_expr(p, v.x) 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, visit_expr(p, v.cond)) document = cons_with_nopl(document, text_token(p, v.op2)) document = cons_with_nopl(document, visit_expr(p, v.y)) case ^Or_Else_Expr: diff --git a/src/server/analysis.odin b/src/server/analysis.odin index bd4f7d4..9be28dd 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -154,6 +154,8 @@ get_poly_node_to_expr :: proc(node: ^ast.Node) -> ^ast.Expr { #partial switch v in node.derived { case ^Ident: return cast(^Expr)node + case ^Comp_Lit: + return v.type case: log.warnf("Unhandled poly to node kind %v", v) } |