Created
November 17, 2015 14:47
-
-
Save ibilon/573885e76ea7bd402179 to your computer and use it in GitHub Desktop.
Compile time macro define information
This file contains hidden or 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
class Test { | |
static function main() { | |
trace(isDemo()); | |
} | |
macro static function isDemo () : haxe.macro.Expr | |
{ | |
return macro $v{haxe.macro.Compiler.getDefine("demo") != null}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment