Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Oct 4, 2018
1 parent 5ea0bf1 commit c893a41
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions compiler/nimeval.nim
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@ proc createInterpreter*(scriptName: string;
initDefines(conf.symbols)
defineSymbol(conf.symbols, "nimscript")
defineSymbol(conf.symbols, "nimconfig")
registerPass(graph, semPass)
registerPass(graph, evalPass)
# Consider factoring this pattern with `runNimScript` or making
# registerPass(graph, pass) evaluate only once per pass
var registeredPasses {.global.} = false
if not registeredPasses:
registeredPasses = true
registerPass(graph, semPass)
registerPass(graph, evalPass)

for p in searchPaths:
conf.searchPaths.add(AbsoluteDir p)
Expand Down

0 comments on commit c893a41

Please sign in to comment.