1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-10 08:44:47 +00:00
Funkin/source/util/macro/MacroUtil.hx

13 lines
279 B
Haxe
Raw Normal View History

2022-02-23 21:58:23 +00:00
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};
}
}