aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Yakimowich-Payne <jyapayne@gmail.com>2020-04-26 11:07:30 -0600
committergenotrance <dev@genotrance.com>2020-05-04 16:43:07 -0500
commit789af2b5cc05204e1cbfda009aaee005d4153248 (patch)
tree0d76dbf414a12627624b221d9c4724272da84d2c
parentf70f836af837376bcad9a76c7fd05b930b0e7506 (diff)
downloadnimterop-789af2b5cc05204e1cbfda009aaee005d4153248.tar.gz
nimterop-789af2b5cc05204e1cbfda009aaee005d4153248.zip
Add comment gen for array type
-rw-r--r--nimterop/ast2.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/nimterop/ast2.nim b/nimterop/ast2.nim
index 0fd5a9d..ab7bb72 100644
--- a/nimterop/ast2.nim
+++ b/nimterop/ast2.nim
@@ -1017,6 +1017,7 @@ proc addTypeArray(gState: State, node: TSNode) =
# node[start] = identifier = type name
(tname, _, info) = gState.getNameInfo(node[start].getAtom(), nskType, parent = "addTypeArray")
tident = gState.getIdent(tname, info, exported = false)
+ commentNodes = gState.getPrevCommentNodes(node)
# Could have multiple types, comma separated
for i in start+1 ..< node.len:
@@ -1050,6 +1051,7 @@ proc addTypeArray(gState: State, node: TSNode) =
# )
# )
+ typeDef.comment = gState.getCommentsStr(commentNodes)
# nkTypeSection.add
gState.typeSection.add typeDef