aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Yakimowich-Payne <jyapayne@gmail.com>2020-05-04 08:10:46 -0600
committergenotrance <dev@genotrance.com>2020-05-04 16:43:07 -0500
commit25660ac47532e4a6e0943e20f42ee34b1165a690 (patch)
tree873c78a3d50ad4443fe63170f9f07637ec2ea3bd
parent36c7331749a3f2ef87d64edf8dcaed4b79d434fb (diff)
downloadnimterop-25660ac47532e4a6e0943e20f42ee34b1165a690.tar.gz
nimterop-25660ac47532e4a6e0943e20f42ee34b1165a690.zip
Fix missing comment in ast2
-rw-r--r--nimterop/ast2.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/nimterop/ast2.nim b/nimterop/ast2.nim
index 759419c..fd70b46 100644
--- a/nimterop/ast2.nim
+++ b/nimterop/ast2.nim
@@ -1651,7 +1651,8 @@ proc addDecl(gState: State, node: TSNode) =
if node[i].getAtom().getPxName(1) == "pointer_declarator":
# proc var
if firstDecl:
- # If
+ # If it's the first declaration, use the whole node
+ # to get the comment above/below
commentNodes = gState.getCommentNodes(node)
firstDecl = false
else:
@@ -1660,7 +1661,8 @@ proc addDecl(gState: State, node: TSNode) =
else:
# proc
if firstDecl:
- # If
+ # If it's the first declaration, use the whole node
+ # to get the comment above/below
commentNodes = gState.getCommentNodes(node)
firstDecl = false
else: