refactoring: fewer global variables
This commit is contained in:
parent
18a3833d60
commit
a325692fb2
6 changed files with 36 additions and 43 deletions
|
|
@ -10,4 +10,15 @@
|
|||
## Include file that imports all plugins that are active.
|
||||
|
||||
import
|
||||
locals / locals, itersgen
|
||||
compiler / [pluginsupport, idents, ast], locals, itersgen
|
||||
|
||||
const
|
||||
plugins: array[2, Plugin] = [
|
||||
("stdlib", "system", "iterToProc", iterToProcImpl),
|
||||
("stdlib", "system", "locals", semLocals)
|
||||
]
|
||||
|
||||
proc getPlugin*(ic: IdentCache; fn: PSym): Transformation =
|
||||
for p in plugins:
|
||||
if pluginMatches(ic, p, fn): return p.t
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue