aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Yakimowich-Payne <jyapayne@gmail.com>2020-04-25 20:47:28 -0600
committergenotrance <dev@genotrance.com>2020-05-04 16:43:07 -0500
commit4f1464bdfb0545f06edf23b2fc92a72733403a5c (patch)
treef7404fafa02e09def62287e9f6877e3ec6d9f307
parentb26f92b0ff2ea4be497ea91b1c16d3b9b7665c73 (diff)
downloadnimterop-4f1464bdfb0545f06edf23b2fc92a72733403a5c.tar.gz
nimterop-4f1464bdfb0545f06edf23b2fc92a72733403a5c.zip
Remove unnecessary proc
-rw-r--r--nimterop/getters.nim11
1 files changed, 1 insertions, 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 ``/* */``