Extended API.
This commit is contained in:
@@ -10,14 +10,23 @@ typedef Types = tink.macro.Types;
|
|||||||
typedef Binops = tink.macro.Ops.Binary;
|
typedef Binops = tink.macro.Ops.Binary;
|
||||||
typedef Unops = tink.macro.Ops.Unary;
|
typedef Unops = tink.macro.Ops.Unary;
|
||||||
|
|
||||||
|
//TODO: consider adding stuff from haxe.macro.Expr here
|
||||||
typedef MacroOutcome<D, F> = tink.core.Outcome<D, F>;
|
typedef MacroOutcome<D, F> = tink.core.Outcome<D, F>;
|
||||||
typedef MacroOutcomeTools = tink.core.Outcome.OutcomeTools;
|
typedef MacroOutcomeTools = tink.core.Outcome.OutcomeTools;
|
||||||
//TODO: consider adding stuff from haxe.macro.Expr here
|
|
||||||
|
typedef Option<T> = haxe.ds.Option<T>;
|
||||||
|
|
||||||
|
typedef Member = tink.macro.Member;
|
||||||
|
typedef Constructor = tink.macro.Constructor;
|
||||||
|
typedef ClassBuilder = tink.macro.ClassBuilder;
|
||||||
|
|
||||||
class MacroApi {
|
class MacroApi {
|
||||||
|
|
||||||
static var idCounter = 0;
|
static var idCounter = 0;
|
||||||
static public inline function tempName(?prefix = '__tinkTmp'):String
|
|
||||||
return prefix + Std.string(idCounter++);
|
@:noUsing static public inline function tempName(?prefix:String = 'tmp'):String
|
||||||
|
return '__tink_' + prefix + Std.string(idCounter++);
|
||||||
|
|
||||||
static public function pos()
|
static public function pos()
|
||||||
return haxe.macro.Context.currentPos();
|
return haxe.macro.Context.currentPos();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user