Fix missing comment in ast2
This commit is contained in:
parent
6895132749
commit
ae5a3f7e7a
1 changed files with 4 additions and 2 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue