active.nim 587 B

12345678910111213141516171819202122232425
  1. #
  2. #
  3. # The Nim Compiler
  4. # (c) Copyright 2015 Andreas Rumpf
  5. #
  6. # See the file "copying.txt", included in this
  7. # distribution, for details about the copyright.
  8. #
  9. ## Include file that imports all plugins that are active.
  10. import
  11. ".." / [pluginsupport, idents, ast], locals, itersgen
  12. const
  13. plugins: array[2, Plugin] = [
  14. ("stdlib", "system", "iterToProc", iterToProcImpl),
  15. ("stdlib", "system", "locals", semLocals)
  16. ]
  17. proc getPlugin*(ic: IdentCache; fn: PSym): Transformation =
  18. for p in plugins:
  19. if pluginMatches(ic, p, fn): return p.t
  20. return nil