mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-30 11:26:53 -05:00
12 lines
279 B
Haxe
12 lines
279 B
Haxe
package util.macro;
|
|
|
|
class MacroUtil
|
|
{
|
|
public static macro function getDefine(key:String, defaultValue:String = null):haxe.macro.Expr
|
|
{
|
|
var value = haxe.macro.Context.definedValue(key);
|
|
if (value == null)
|
|
value = defaultValue;
|
|
return macro $v{value};
|
|
}
|
|
}
|