summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/docgen.nim2
-rw-r--r--compiler/parser.nim5
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 8ae32492a..8536cc619 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -158,7 +158,7 @@ proc genRecComment(d: PDoc, n: PNode): Rope =
   if n == nil: return nil
   result = genComment(d, n).rope
   if result == nil:
-    if n.kind notin {nkEmpty..nkNilLit}:
+    if n.kind notin {nkEmpty..nkNilLit, nkEnumTy}:
       for i in countup(0, len(n)-1):
         result = genRecComment(d, n.sons[i])
         if result != nil: return
diff --git a/compiler/parser.nim b/compiler/parser.nim
index 05b4df13d..074e13a93 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -123,7 +123,7 @@ proc rawSkipComment(p: var TParser, node: PNode) =
     getTok(p)
 
 proc skipComment(p: var TParser, node: PNode) =
-  if p.tok.indent < 0: rawSkipComment(p, node)
+  if p.tok.indent < 0 or realInd(p): rawSkipComment(p, node)
 
 proc skipInd(p: var TParser) =
   if p.tok.indent >= 0:
@@ -887,7 +887,7 @@ proc parseTuple(p: var TParser, indentAllowed = false): PNode =
     skipComment(p, result)
     if realInd(p):
       withInd(p):
-        skipComment(p, result)
+        rawSkipComment(p, result)
         while true:
           case p.tok.tokType
           of tkSymbol, tkAccent:
@@ -1608,6 +1608,7 @@ proc parseEnum(p: var TParser): PNode =
   getTok(p)
   addSon(result, ast.emptyNode)
   optInd(p, result)
+  rawSkipComment(p, result)
   while true:
     var a = parseSymbol(p)
     if a.kind == nkEmpty: return