Remove ropes dependency
This commit is contained in:
parent
02de68b36d
commit
864506afbc
1 changed files with 4 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import os, osproc, regex, ropes, streams, strutils
|
import os, osproc, regex, streams, strutils
|
||||||
|
|
||||||
import globals
|
import globals
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ proc runPreprocess*(file, ppflags, flags: string, inline: bool): string =
|
||||||
|
|
||||||
# Include content only from file
|
# Include content only from file
|
||||||
var
|
var
|
||||||
rdata = rope("")
|
rdata: seq[string] = @[]
|
||||||
start = false
|
start = false
|
||||||
sfile = file.sanitizePath
|
sfile = file.sanitizePath
|
||||||
|
|
||||||
|
|
@ -131,9 +131,9 @@ proc runPreprocess*(file, ppflags, flags: string, inline: bool): string =
|
||||||
line.multiReplace([("_Noreturn", ""), ("(())", ""), ("WINAPI", ""),
|
line.multiReplace([("_Noreturn", ""), ("(())", ""), ("WINAPI", ""),
|
||||||
("__attribute__", ""), ("extern \"C\"", "")])
|
("__attribute__", ""), ("extern \"C\"", "")])
|
||||||
.replace(re"\(\([_a-z]+?\)\)", "")
|
.replace(re"\(\([_a-z]+?\)\)", "")
|
||||||
.replace(re"\(\(__format__[\s]*\(__[gnu_]*printf__, [\d]+, [\d]+\)\)\);", ";") & "\n"
|
.replace(re"\(\(__format__[\s]*\(__[gnu_]*printf__, [\d]+, [\d]+\)\)\);", ";")
|
||||||
)
|
)
|
||||||
return $rdata
|
return rdata.join("\n")
|
||||||
|
|
||||||
proc runCtags*(file: string): string =
|
proc runCtags*(file: string): string =
|
||||||
var
|
var
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue