compiler_ropes: don't expose newRope
This commit is contained in:
parent
97d2df9bac
commit
b4e4ea8d1b
3 changed files with 5 additions and 5 deletions
|
|
@ -77,13 +77,13 @@ proc mangleName(s: PSym): PRope =
|
||||||
# These are not properly scoped now - we need to add blocks
|
# These are not properly scoped now - we need to add blocks
|
||||||
# around for loops in transf
|
# around for loops in transf
|
||||||
if keepOrigName:
|
if keepOrigName:
|
||||||
result = s.name.s.mangle.newRope
|
result = s.name.s.mangle.toRope
|
||||||
else:
|
else:
|
||||||
app(result, newRope(mangle(s.name.s)))
|
app(result, toRope(mangle(s.name.s)))
|
||||||
app(result, ~"_")
|
app(result, ~"_")
|
||||||
app(result, toRope(s.id))
|
app(result, toRope(s.id))
|
||||||
else:
|
else:
|
||||||
app(result, newRope(mangle(s.name.s)))
|
app(result, toRope(mangle(s.name.s)))
|
||||||
app(result, ~"_")
|
app(result, ~"_")
|
||||||
app(result, toRope(s.id))
|
app(result, toRope(s.id))
|
||||||
s.loc.r = result
|
s.loc.r = result
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ proc commandJSON*() =
|
||||||
var d = newDocumentor(gProjectFull, options.gConfigVars)
|
var d = newDocumentor(gProjectFull, options.gConfigVars)
|
||||||
d.hasToc = true
|
d.hasToc = true
|
||||||
var json = generateJson(d, ast)
|
var json = generateJson(d, ast)
|
||||||
var content = newRope(pretty(json))
|
var content = toRope(pretty(json))
|
||||||
|
|
||||||
if optStdout in gGlobalOptions:
|
if optStdout in gGlobalOptions:
|
||||||
writeRope(stdout, content)
|
writeRope(stdout, content)
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ proc len*(a: PRope): int =
|
||||||
if a == nil: result = 0
|
if a == nil: result = 0
|
||||||
else: result = a.length
|
else: result = a.length
|
||||||
|
|
||||||
proc newRope*(data: string = nil): PRope =
|
proc newRope(data: string = nil): PRope =
|
||||||
new(result)
|
new(result)
|
||||||
if data != nil:
|
if data != nil:
|
||||||
result.length = len(data)
|
result.length = len(data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue