Fix missing comment in ast2

This commit is contained in:
Joey Yakimowich-Payne 2020-05-04 08:10:46 -06:00 • committed by genotrance
commit 25660ac475

View file

@ -1651,7 +1651,8 @@ proc addDecl(gState: State, node: TSNode) =
if node[i].getAtom().getPxName(1) == "pointer_declarator": if node[i].getAtom().getPxName(1) == "pointer_declarator":
# proc var # proc var
if firstDecl: if firstDecl:
# If # If it's the first declaration, use the whole node
# to get the comment above/below
commentNodes = gState.getCommentNodes(node) commentNodes = gState.getCommentNodes(node)
firstDecl = false firstDecl = false
else: else:
@ -1660,7 +1661,8 @@ proc addDecl(gState: State, node: TSNode) =
else: else:
# proc # proc
if firstDecl: if firstDecl:
# If # If it's the first declaration, use the whole node
# to get the comment above/below
commentNodes = gState.getCommentNodes(node) commentNodes = gState.getCommentNodes(node)
firstDecl = false firstDecl = false
else: else: