Remove unnecessary proc
This commit is contained in:
parent
b26f92b0ff
commit
4f1464bdfb
1 changed files with 1 additions and 10 deletions
|
|
@ -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 algorithm
|
||||||
|
|
||||||
import regex
|
import regex
|
||||||
|
|
@ -644,15 +644,6 @@ proc getCommentsStr*(gState: State, commentNodes: seq[TSNode]): string =
|
||||||
for commentNode in commentNodes:
|
for commentNode in commentNodes:
|
||||||
result &= "\n " & gState.getNodeVal(commentNode).replace(re" *(//|/\*\*|\*\*/|/\*|\*/|\*)", "").replace("\n", "\n ").strip()
|
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] =
|
proc getPrevCommentNodes*(node: TSNode, maxSearch=1): seq[TSNode] =
|
||||||
## Here we want to go until the node we get is not a comment
|
## Here we want to go until the node we get is not a comment
|
||||||
## for cases with multiple ``//`` comments instead of one ``/* */``
|
## for cases with multiple ``//`` comments instead of one ``/* */``
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue