From ae5a3f7e7a918b26e69190ad23b69eb7d27faf3c Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Mon, 4 May 2020 08:10:46 -0600 Subject: [PATCH] Fix missing comment in ast2 --- nimterop/ast2.nim | 6 ++++-- 1 file 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: