summaryrefslogtreecommitdiff
path: root/Source/Dafny/Printer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Dafny/Printer.cs')
-rw-r--r--Source/Dafny/Printer.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/Dafny/Printer.cs b/Source/Dafny/Printer.cs
index b82a7169..1a447165 100644
--- a/Source/Dafny/Printer.cs
+++ b/Source/Dafny/Printer.cs
@@ -578,7 +578,12 @@ namespace Microsoft.Dafny {
if (s.IsGhost) {
wr.Write("ghost ");
}
- wr.Write("var {0}", s.DisplayName);
+ wr.Write("var");
+ if (s.HasAttributes())
+ {
+ PrintAttributes(s.Attributes);
+ }
+ wr.Write(" {0}", s.DisplayName);
PrintType(": ", s.OptionalType);
wr.Write(";");
@@ -732,12 +737,17 @@ namespace Microsoft.Dafny {
if (s.Lhss[0].IsGhost) {
wr.Write("ghost ");
}
- wr.Write("var ");
+ wr.Write("var");
string sep = "";
foreach (var lhs in s.Lhss) {
- wr.Write("{0}{1}", sep, lhs.DisplayName);
+ wr.Write(sep);
+ if (lhs.HasAttributes())
+ {
+ PrintAttributes(lhs.Attributes);
+ }
+ wr.Write(" {0}", lhs.DisplayName);
PrintType(": ", lhs.OptionalType);
- sep = ", ";
+ sep = ",";
}
if (s.Update != null) {
PrintUpdateRHS(s.Update);