Merge branch 'devel' into update_debug
This commit is contained in:
commit
597c6abff9
2 changed files with 8 additions and 4 deletions
|
|
@ -228,8 +228,12 @@ macro ropecg(m: BModule, frmt: static[FormatStr], args: untyped): Rope =
|
||||||
result.add newCall(ident"rope", resVar)
|
result.add newCall(ident"rope", resVar)
|
||||||
|
|
||||||
proc addIndent(p: BProc; result: var Rope) =
|
proc addIndent(p: BProc; result: var Rope) =
|
||||||
for i in 0..<p.blocks.len:
|
var i = result.len
|
||||||
result.add "\t".rope
|
let newLen = i + p.blocks.len
|
||||||
|
result.setLen newLen
|
||||||
|
while i < newLen:
|
||||||
|
result[i] = '\t'
|
||||||
|
inc i
|
||||||
|
|
||||||
template appcg(m: BModule, c: var Rope, frmt: FormatStr,
|
template appcg(m: BModule, c: var Rope, frmt: FormatStr,
|
||||||
args: untyped) =
|
args: untyped) =
|
||||||
|
|
|
||||||
|
|
@ -188,13 +188,13 @@ func toDoublyLinkedList*[T](elems: openArray[T]): DoublyLinkedList[T] {.since: (
|
||||||
result.add(elem)
|
result.add(elem)
|
||||||
|
|
||||||
template itemsListImpl() {.dirty.} =
|
template itemsListImpl() {.dirty.} =
|
||||||
var it = L.head
|
var it {.cursor.} = L.head
|
||||||
while it != nil:
|
while it != nil:
|
||||||
yield it.value
|
yield it.value
|
||||||
it = it.next
|
it = it.next
|
||||||
|
|
||||||
template itemsRingImpl() {.dirty.} =
|
template itemsRingImpl() {.dirty.} =
|
||||||
var it = L.head
|
var it {.cursor.} = L.head
|
||||||
if it != nil:
|
if it != nil:
|
||||||
while true:
|
while true:
|
||||||
yield it.value
|
yield it.value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue