From 789af2b5cc05204e1cbfda009aaee005d4153248 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Sun, 26 Apr 2020 11:07:30 -0600 Subject: Add comment gen for array type --- nimterop/ast2.nim | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3