summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jason Koenig <unknown>2011-06-29 17:57:55 -0700
committerGravatar Jason Koenig <unknown>2011-06-29 17:57:55 -0700
commit5a727a4d48b45860bd21d4244c3cceb4e617a9b7 (patch)
tree23239e6b267856aa38e373fb75cdd19955ecde2d
parented4de48db00b736bcc31472e63cd14ec4d96d832 (diff)
Added returns with parameters to printer.
-rw-r--r--Source/Dafny/Printer.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/Dafny/Printer.cs b/Source/Dafny/Printer.cs
index 9970d61a..e49ce6e9 100644
--- a/Source/Dafny/Printer.cs
+++ b/Source/Dafny/Printer.cs
@@ -424,7 +424,17 @@ namespace Microsoft.Dafny {
}
} else if (stmt is ReturnStmt) {
- wr.Write("return;");
+ var s = (ReturnStmt) stmt;
+ wr.Write("return");
+ if (s.rhss != null) {
+ var sep = " ";
+ foreach (var rhs in s.rhss) {
+ wr.Write(sep);
+ PrintRhs(rhs);
+ sep = ", ";
+ }
+ }
+ wr.Write(";");
} else if (stmt is AssignStmt) {
AssignStmt s = (AssignStmt)stmt;