diff options
author | metagn <metagngn@gmail.com> | 2022-09-28 16:05:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 15:05:01 +0200 |
commit | de4b0346bdafab6c38b77d430d0e83f95da0582c (patch) | |
tree | 7ec601bf0f57ccf2f6d1ad5892f14eafb2c406df /tests/macros/t19766_20114.nim | |
parent | fdc6b0fb6e1b7272f32f177da4e44d9055c00b67 (diff) | |
download | Nim-de4b0346bdafab6c38b77d430d0e83f95da0582c.tar.gz |
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
Diffstat (limited to 'tests/macros/t19766_20114.nim')
-rw-r--r-- | tests/macros/t19766_20114.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/macros/t19766_20114.nim b/tests/macros/t19766_20114.nim new file mode 100644 index 000000000..ac336f150 --- /dev/null +++ b/tests/macros/t19766_20114.nim @@ -0,0 +1,16 @@ +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 |