don't eval wrong code
This commit is contained in:
parent
c87e1c96ad
commit
b4232a672f
1 changed files with 7 additions and 1 deletions
|
|
@ -1495,7 +1495,13 @@ proc myOpen(module: PSym): PPassContext =
|
|||
pushStackFrame(c, newStackFrame())
|
||||
result = c
|
||||
|
||||
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)
|
||||
|
||||
const evalPass* = makePass(myOpen, nil, myProcess, myProcess)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue