Files
Nim/tests/macros/t19766_20114.nim
metagn de4b0346bd store full definition AST for consts, fix noRewrite (#20115)
* continue #9582 for consts, close #9331, fix #20114

also move extractPragma to ast to pave the way for things like {.strdefine: "abc".} etc

* changelog correctly

* fix jsgen

* update tgetimpl

* fix sighashes

* fix #19766, add comment about postfix

* fix noRewrite LOL

refs #16620

* fix changelog

* fix destructors
2022-09-28 15:05:01 +02:00

17 lines
220 B
Nim

discard """
action: compile
nimout: '''
const
foo {.strdefine.} = "abc"
let hey {.tddd.} = 5
'''
"""
import macros
template tddd {.pragma.}
expandMacros:
const foo {.strdefine.} = "abc"
let hey {.tddd.} = 5