Skip to content

Instantly share code, notes, and snippets.

@zah
Created December 17, 2013 21:09
Show Gist options
  • Select an option

  • Save zah/8012667 to your computer and use it in GitHub Desktop.

Select an option

Save zah/8012667 to your computer and use it in GitHub Desktop.
import ast, parser
{.pragma: libnim, exportc: "nim_$1", dynlib, cdecl.}
proc parse(code: cstring): int {.libnim.} =
var n = parseString($code)
return ord(n != nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment