diff options
author | wuestholz <unknown> | 2013-11-18 21:46:01 +0100 |
---|---|---|
committer | wuestholz <unknown> | 2013-11-18 21:46:01 +0100 |
commit | f862bd100e2d0696962339412bb056f7191a1d91 (patch) | |
tree | 1b8b50def4aab7743a6d2bbc022e345d55b1a6f8 /Source/Dafny/Dafny.atg | |
parent | 0975663860053e1ed568b971abb1e0d25cc48f3a (diff) |
Added support for attributes on variable declarations.
Diffstat (limited to 'Source/Dafny/Dafny.atg')
-rw-r--r-- | Source/Dafny/Dafny.atg | 7 |
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);
|