summaryrefslogtreecommitdiff
path: root/Source/Dafny/Dafny.atg
diff options
context:
space:
mode:
authorGravatar leino <unknown>2014-12-09 19:34:08 -0800
committerGravatar leino <unknown>2014-12-09 19:34:08 -0800
commit2cb39832d3acc19e48d07efd37758d005785f09d (patch)
treed0269c15ad86bdd3bb02a84afffde370b489d1f4 /Source/Dafny/Dafny.atg
parent22ea901b086b05385d98019ee9eefdab97652499 (diff)
parent5ceb4c87998c2b0eaa5a6431b717b295e39c2d29 (diff)
Merge
Diffstat (limited to 'Source/Dafny/Dafny.atg')
-rw-r--r--Source/Dafny/Dafny.atg10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Dafny/Dafny.atg b/Source/Dafny/Dafny.atg
index 78fccb60..a716da96 100644
--- a/Source/Dafny/Dafny.atg
+++ b/Source/Dafny/Dafny.atg
@@ -570,7 +570,8 @@ ClassDecl<ModuleDefinition/*!*/ module, out ClassDecl/*!*/ c>
= (. Contract.Requires(module != null);
Contract.Ensures(Contract.ValueAtReturn(out c) != null);
IToken/*!*/ id;
- Type/*!*/ trait = null;
+ Type trait = null;
+ List<Type>/*!*/ traits = new List<Type>();
Attributes attrs = null;
List<TypeParameter/*!*/> typeArgs = new List<TypeParameter/*!*/>();
List<MemberDecl/*!*/> members = new List<MemberDecl/*!*/>();
@@ -581,12 +582,15 @@ ClassDecl<ModuleDefinition/*!*/ module, out ClassDecl/*!*/ c>
{ Attribute<ref attrs> }
NoUSIdent<out id>
[ GenericParameters<typeArgs> ]
- ["extends" Type<out trait>]
+ ["extends"
+ Type<out trait> (. traits.Add(trait); .)
+ {"," Type<out trait> (. traits.Add(trait); .) }
+ ]
"{" (. bodyStart = t; .)
{ ClassMemberDecl<members, true>
}
"}"
- (. c = new ClassDecl(id, id.val, module, typeArgs, members, attrs, trait);
+ (. c = new ClassDecl(id, id.val, module, typeArgs, members, attrs, traits);
c.BodyStartTok = bodyStart;
c.BodyEndTok = t;
.)