summaryrefslogtreecommitdiff
path: root/Source/Dafny/Parser.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <unknown>2013-04-19 15:17:12 -0700
committerGravatar Rustan Leino <unknown>2013-04-19 15:17:12 -0700
commit7555f1e7dc8556b8ff1d2cab3c637b0556d1a946 (patch)
treeec2a21d9316150b9d0e7e8bdb44628570115cdfc /Source/Dafny/Parser.cs
parent02f82c2a76acf6a9bbd3becfcfa0aebb57f14443 (diff)
Make semi-colon after datatype/codatatype declaration optional (in the future, it will not be allowed at all)
Diffstat (limited to 'Source/Dafny/Parser.cs')
-rw-r--r--Source/Dafny/Parser.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Dafny/Parser.cs b/Source/Dafny/Parser.cs
index 451cdd5c..aecb4ab1 100644
--- a/Source/Dafny/Parser.cs
+++ b/Source/Dafny/Parser.cs
@@ -414,8 +414,10 @@ bool IsLoopSpecOrAlternative() {
Get();
DatatypeMemberDecl(ctors);
}
- while (!(la.kind == 0 || la.kind == 15)) {SynErr(125); Get();}
- Expect(15);
+ if (la.kind == 15) {
+ while (!(la.kind == 0 || la.kind == 15)) {SynErr(125); Get();}
+ Get();
+ }
if (co) {
dt = new CoDatatypeDecl(id, id.val, module, typeArgs, ctors, attrs);
} else {