tcodegendeclproc.nim 208 B

123456789101112
  1. discard """
  2. output: '''
  3. -1
  4. 8
  5. '''
  6. ccodecheck: "'console.log(-1); function fac_' \\d+ '(n_' \\d+ ')'"
  7. """
  8. proc fac(n: int): int {.codegenDecl: "console.log(-1); function $2($3)".} =
  9. return n
  10. echo fac(8)