summaryrefslogtreecommitdiff
path: root/Source/Dafny/Dafny.atg
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2013-11-18 21:46:01 +0100
committerGravatar wuestholz <unknown>2013-11-18 21:46:01 +0100
commitf862bd100e2d0696962339412bb056f7191a1d91 (patch)
tree1b8b50def4aab7743a6d2bbc022e345d55b1a6f8 /Source/Dafny/Dafny.atg
parent0975663860053e1ed568b971abb1e0d25cc48f3a (diff)
Added support for attributes on variable declarations.
Diffstat (limited to 'Source/Dafny/Dafny.atg')
-rw-r--r--Source/Dafny/Dafny.atg7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Dafny/Dafny.atg b/Source/Dafny/Dafny.atg
index 2f5228d9..c7eaa427 100644
--- a/Source/Dafny/Dafny.atg
+++ b/Source/Dafny/Dafny.atg
@@ -1090,13 +1090,16 @@ VarDeclStatement<.out Statement/*!*/ s.>
List<AssignmentRhs> rhss = new List<AssignmentRhs>();
IToken suchThatAssume = null;
Expression suchThat = null;
+ Attributes attrs = null;
.)
[ "ghost" (. isGhost = true; x = t; .)
]
"var" (. if (!isGhost) { x = t; } .)
- LocalIdentTypeOptional<out d, isGhost> (. lhss.Add(d); .)
+ { Attribute<ref attrs> }
+ LocalIdentTypeOptional<out d, isGhost> (. lhss.Add(d); d.Attributes = attrs; attrs = null; .)
{ ","
- LocalIdentTypeOptional<out d, isGhost> (. lhss.Add(d); .)
+ { Attribute<ref attrs> }
+ LocalIdentTypeOptional<out d, isGhost> (. lhss.Add(d); d.Attributes = attrs; attrs = null; .)
}
[ ":=" (. assignTok = t;
lhs0 = new IdentifierExpr(lhss[0].Tok, lhss[0].Name);