summaryrefslogtreecommitdiff
path: root/Source/Dafny/Parser.cs
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/Parser.cs
parent22ea901b086b05385d98019ee9eefdab97652499 (diff)
parent5ceb4c87998c2b0eaa5a6431b717b295e39c2d29 (diff)
Merge
Diffstat (limited to 'Source/Dafny/Parser.cs')
-rw-r--r--Source/Dafny/Parser.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs
index d84261d6..ed51ff17 100644
--- a/Source/Dafny/Parser.cs
+++ b/Source/Dafny/Parser.cs
@@ -682,7 +682,8 @@ bool IsType(ref IToken pt) {
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/*!*/>();
@@ -700,6 +701,12 @@ bool IsType(ref IToken pt) {
if (la.kind == 62) {
Get();
Type(out trait);
+ traits.Add(trait);
+ while (la.kind == 9) {
+ Get();
+ Type(out trait);
+ traits.Add(trait);
+ }
}
Expect(38);
bodyStart = t;
@@ -707,7 +714,7 @@ bool IsType(ref IToken pt) {
ClassMemberDecl(members, true);
}
Expect(39);
- 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;