# I added the echo to the end of the macro: macro exportWasm(def: untyped): untyped = result = def result[^3] = nnkPragma.newTree( ident("exportc"), nnkExprColonExpr.newTree( ident("codegenDecl"), newStrLitNode("attribute((export_name(\"$2\"))) $1 $2$3") ) ) echo result[^3]