summaryrefslogtreecommitdiff
path: root/Source/Dafny/DafnyAst.cs
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-11-14 14:50:26 -0800
committerGravatar qunyanm <unknown>2015-11-14 14:50:26 -0800
commit854acf0f7f5aa105500c6d0ee0fcf0d4c918a81e (patch)
tree782088f9c132efca00ff8b042d4cf32f41bbf82d /Source/Dafny/DafnyAst.cs
parentcfd717411a1d82e4d0b1ad845cbe0984ecc1618f (diff)
Fix issue 94. Allow tuple-based assignment in statement contexts.
Diffstat (limited to 'Source/Dafny/DafnyAst.cs')
-rw-r--r--Source/Dafny/DafnyAst.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs
index 9ed3b7e0..847617aa 100644
--- a/Source/Dafny/DafnyAst.cs
+++ b/Source/Dafny/DafnyAst.cs
@@ -4084,6 +4084,28 @@ namespace Microsoft.Dafny {
}
}
+ public class LetStmt : Statement
+ {
+ public readonly List<CasePattern> LHSs;
+ public readonly List<Expression> RHSs;
+
+ public LetStmt(IToken tok, IToken endTok, List<CasePattern> lhss, List<Expression> rhss)
+ : base(tok, endTok) {
+ LHSs = lhss;
+ RHSs = rhss;
+ }
+
+ public IEnumerable<BoundVar> BoundVars {
+ get {
+ foreach (var lhs in LHSs) {
+ foreach (var bv in lhs.Vars) {
+ yield return bv;
+ }
+ }
+ }
+ }
+ }
+
/// <summary>
/// Common superclass of UpdateStmt and AssignSuchThatStmt.
/// </summary>