summary refs log tree commit diff stats
path: root/nim/pnimsyn.pas
diff options
context:
space:
mode:
Diffstat (limited to 'nim/pnimsyn.pas')
-rw-r--r--nim/pnimsyn.pas11
1 files changed, 10 insertions, 1 deletions
diff --git a/nim/pnimsyn.pas b/nim/pnimsyn.pas
index 95d6e64f9..51c0cd4f5 100644
--- a/nim/pnimsyn.pas
+++ b/nim/pnimsyn.pas
@@ -1,7 +1,7 @@
 //
 //
 //           The Nimrod Compiler
-//        (c) Copyright 2008 Andreas Rumpf
+//        (c) Copyright 2009 Andreas Rumpf
 //
 //    See the file "copying.txt", included in this
 //    distribution, for details about the copyright.
@@ -1663,6 +1663,14 @@ begin
   addSon(result, parseRecordPart(p));
 end;
 
+function parseAbstract(var p: TParser): PNode;
+begin
+  result := newNodeP(nkAbstractTy, p);
+  getTok(p);
+  optInd(p, result);
+  addSon(result, parseTypeDesc(p));
+end;
+
 function parseTypeDef(var p: TParser): PNode;
 var
   a: PNode;
@@ -1676,6 +1684,7 @@ begin
     case p.tok.tokType of
       tkObject: a := parseRecordOrObject(p, nkObjectTy);
       tkEnum: a := parseEnum(p);
+      tkAbstract: a := parseAbstract(p);
       else a := parseTypeDesc(p);
     end;
     addSon(result, a);