From 4f1464bdfb0545f06edf23b2fc92a72733403a5c Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Sat, 25 Apr 2020 20:47:28 -0600 Subject: Remove unnecessary proc --- nimterop/getters.nim | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/nimterop/getters.nim b/nimterop/getters.nim index 1240130..281e3a4 100644 --- a/nimterop/getters.nim +++ b/nimterop/getters.nim @@ -1,4 +1,4 @@ -import dynlib, macros, os, sequtils, sets, strformat, strutils, tables, times, options +import dynlib, macros, os, sequtils, sets, strformat, strutils, tables, times import algorithm import regex @@ -644,15 +644,6 @@ proc getCommentsStr*(gState: State, commentNodes: seq[TSNode]): string = for commentNode in commentNodes: result &= "\n " & gState.getNodeVal(commentNode).replace(re" *(//|/\*\*|\*\*/|/\*|\*/|\*)", "").replace("\n", "\n ").strip() -template findComment(procName: untyped): untyped = - var sibling = node.`procName`() - var i = 0 - while not sibling.isNil and i < maxSearch: - if sibling.getName() == "comment": - return some(sibling) - sibling = sibling.`procName`() - i += 1 - proc getPrevCommentNodes*(node: TSNode, maxSearch=1): seq[TSNode] = ## Here we want to go until the node we get is not a comment ## for cases with multiple ``//`` comments instead of one ``/* */`` -- cgit v1.2.3