aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-02-11 11:54:41 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2022-02-11 11:54:41 +0100
commit1a771b196ce9fdb82bbd5f0a0bbae30e4352236d (patch)
treede5387a1c04d70c77fb2e825db1ae601fae6a714 /src
parent5ef5c58b4794b82907b4766c5d6e55b7107fbdb2 (diff)
odinfmt: support diverging procedure
Diffstat (limited to 'src')
-rw-r--r--src/odin/printer/visit.odin4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/odin/printer/visit.odin b/src/odin/printer/visit.odin
index 400b281..79586b7 100644
--- a/src/odin/printer/visit.odin
+++ b/src/odin/printer/visit.odin
@@ -1429,6 +1429,10 @@ visit_proc_type :: proc(p: ^Printer, proc_type: ast.Proc_Type) -> ^Document {
} else {
document = cons(document, group(nest(p.indentation_count, cons(break_with(" "), group(visit_signature_list(p, proc_type.results))))))
}
+ } else if proc_type.diverging {
+ document = cons_with_nopl(document, text("-"))
+ document = cons(document, text(">"))
+ document = cons_with_nopl(document, text("!"))
}
return document