mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-10 00:34:40 +00:00
13 lines
274 B
Haxe
13 lines
274 B
Haxe
package funkin.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};
|
|
}
|
|
}
|