Created
June 12, 2010 15:48
-
-
Save od0x0/435839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro{ | |
//In here, we could get involved with the parsing and output of the file we are in | |
//Executed at compile time by the compiler | |
//The code in here would be considered an extension of rock | |
//We could use rock classes and such, like VariableAccess or VariableDecl, whatever | |
//Imagine that I am just switching a function call of ZombyWoof with FrankZappa within here | |
//A very trivial usage, but shows a point | |
} | |
FrankZappa: func(string: String){ | |
string println() | |
} | |
ZombyWoof: func(string: String){ | |
string+" zombie" println() | |
} | |
ZombyWoof("ZombyWoof") | |
//Would print ZombyWoof | |
FrankZappa("FrankZappa") | |
//Would print FrankZappa because only the function calls were switched, not the declaration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment