summary refs log tree commit diff stats
path: root/tests/vm/texcl.nim
blob: 41975f27b75d19520190926e53b385077032ec36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
discard """
  output: '''false'''
"""

import macros

type
  nlOptions = enum
    nloNone
    nloDebug

var nlOpts {.compileTime.} = {nloDebug}

proc initOpts(): set[nlOptions] =
  result.incl nloDebug
  result.incl nloNone
  result.excl nloDebug

const cOpts = initOpts()

macro nlo() =
  nlOpts.incl(nloNone)
  nlOpts.excl(nloDebug)
  result = newEmptyNode()

nlo()
echo nloDebug in cOpts