texcl.nim 391 B

12345678910111213141516171819202122232425262728
  1. discard """
  2. output: '''false'''
  3. """
  4. import macros
  5. type
  6. nlOptions = enum
  7. nloNone
  8. nloDebug
  9. var nlOpts {.compileTime.} = {nloDebug}
  10. proc initOpts(): set[nlOptions] =
  11. result.incl nloDebug
  12. result.incl nloNone
  13. result.excl nloDebug
  14. const cOpts = initOpts()
  15. macro nlo() =
  16. nlOpts.incl(nloNone)
  17. nlOpts.excl(nloDebug)
  18. result = newEmptyNode()
  19. nlo()
  20. echo nloDebug in cOpts