small REPL improvements
This commit is contained in:
parent
2ca05eeb16
commit
976d5b18ed
3 changed files with 7 additions and 6 deletions
|
|
@ -1532,10 +1532,11 @@ var oldErrorCount: int
|
|||
|
||||
proc myProcess(c: PPassContext, n: PNode): PNode =
|
||||
# don't eval errornous code:
|
||||
if oldErrorCount != msgs.gErrorCounter:
|
||||
oldErrorCount = msgs.gErrorCounter
|
||||
return n
|
||||
result = eval(PEvalContext(c), n)
|
||||
if oldErrorCount == msgs.gErrorCounter:
|
||||
result = eval(PEvalContext(c), n)
|
||||
else:
|
||||
result = n
|
||||
oldErrorCount = msgs.gErrorCounter
|
||||
|
||||
const evalPass* = makePass(myOpen, nil, myProcess, myProcess)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue