mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 03:02:31 +00:00
26 lines
430 B
Nim
26 lines
430 B
Nim
discard """
|
|
msg: '''nnkStmtList.newTree(
|
|
nnkVarSection.newTree(
|
|
nnkIdentDefs.newTree(
|
|
newIdentNode(!"x"),
|
|
newEmptyNode(),
|
|
nnkCall.newTree(
|
|
nnkDotExpr.newTree(
|
|
newIdentNode(!"foo"),
|
|
newIdentNode(!"create")
|
|
),
|
|
newLit(56)
|
|
)
|
|
)
|
|
)
|
|
)'''
|
|
"""
|
|
|
|
# disabled; can't work as the output is done by the compiler
|
|
|
|
import macros
|
|
|
|
dumpAstGen:
|
|
var x = foo.create(56)
|
|
|