merged things from devel
This commit is contained in:
commit
9d9c3fe121
14 changed files with 110 additions and 48 deletions
|
|
@ -949,7 +949,7 @@ proc liftLambdas*(fn: PSym, body: PNode): PNode =
|
|||
discard transformOuterProcBody(o, body, initIter(fn))
|
||||
result = ex
|
||||
finishEnvironments(o)
|
||||
#if fn.name.s == "cbOuter":
|
||||
#if fn.name.s == "parseLong":
|
||||
# echo rendertree(result, {renderIds})
|
||||
|
||||
proc liftLambdasForTopLevel*(module: PSym, body: PNode): PNode =
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ proc lowerTupleUnpacking*(n: PNode; owner: PSym): PNode =
|
|||
|
||||
result.add newAsgnStmt(newSymNode(temp), value)
|
||||
for i in 0 .. n.len-3:
|
||||
if n.sons[i].kind == nkSym: v.addVar(n.sons[i])
|
||||
result.add newAsgnStmt(n.sons[i], newTupleAccess(value, i))
|
||||
|
||||
proc createObj*(owner: PSym, info: TLineInfo): PType =
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ import ast, types, msgs, osproc, streams, options
|
|||
proc readOutput(p: Process): string =
|
||||
result = ""
|
||||
var output = p.outputStream
|
||||
discard p.waitForExit
|
||||
while not output.atEnd:
|
||||
result.add(output.readLine)
|
||||
result.add("\n")
|
||||
result.setLen(result.len - "\n".len)
|
||||
discard p.waitForExit
|
||||
|
||||
proc opGorge*(cmd, input: string): string =
|
||||
var p = startCmd(cmd)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ proc debugInfo(info: TLineInfo): string =
|
|||
proc codeListing(c: PCtx, result: var string, start=0; last = -1) =
|
||||
# first iteration: compute all necessary labels:
|
||||
var jumpTargets = initIntSet()
|
||||
|
||||
let last = if last < 0: c.code.len-1 else: min(last, c.code.len-1)
|
||||
for i in start..last:
|
||||
let x = c.code[i]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue