Skip to content

Instantly share code, notes, and snippets.

@flaviut
Created April 12, 2014 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flaviut/10513489 to your computer and use it in GitHub Desktop.
Save flaviut/10513489 to your computer and use it in GitHub Desktop.
import macros
macro void(name: expr): stmt {.immediate.} =
echo reprTree name
#CurlyExpr
# Call
# Ident !"abc"
# Command
# Ident !"int"
# Ident !"a"
# Command
# Ident !"string"
# Ident !"b"
# Command
# Ident !"echo"
# StrLit test
void abc(int a, string b){
echo "test"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment