aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 ``/* */``