tcodegendecllambda.nim 275 B

123456789101112131415
  1. discard """
  2. targets: "c cpp js"
  3. ccodecheck: "'HELLO'"
  4. action: compile
  5. """
  6. when defined(js):
  7. var foo = proc(): void{.codegenDecl: "/*HELLO*/function $2($3)".} =
  8. echo "baa"
  9. else:
  10. var foo = proc(): void{.codegenDecl: "/*HELLO*/$1 $2 $3".} =
  11. echo "baa"
  12. foo()