Rename facade and update code to deal with that.
This commit is contained in:
@@ -13,9 +13,9 @@ typedef Outcome<D, F> = tink.core.Outcome<D, F>;
|
||||
typedef OutcomeTools = tink.core.Outcome.OutcomeTools;
|
||||
//TODO: consider adding stuff from haxe.macro.Expr here
|
||||
|
||||
class Macro {
|
||||
class MacroApi {
|
||||
static var idCounter = 0;
|
||||
static public inline function tempName(c:Class<String>, ?prefix = '__tinkTmp'):String
|
||||
static public inline function tempName(?prefix = '__tinkTmp'):String
|
||||
return prefix + Std.string(idCounter++);
|
||||
static public function pos() return haxe.macro.Context.currentPos();
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import haxe.macro.Type;
|
||||
import haxe.macro.Context;
|
||||
import haxe.macro.Printer;
|
||||
|
||||
using tink.Macro;
|
||||
using tink.MacroApi;
|
||||
using Lambda;
|
||||
|
||||
class ClassBuilder {
|
||||
|
||||
@@ -2,7 +2,7 @@ package tink.macro;
|
||||
|
||||
import haxe.macro.Expr;
|
||||
|
||||
using tink.Macro;
|
||||
using tink.MacroApi;
|
||||
|
||||
class Constructor {
|
||||
var oldStatements:Array<Expr>;
|
||||
@@ -18,7 +18,7 @@ class Constructor {
|
||||
public function new(f:Function, ?isPublic:Null<Bool> = null, ?pos:Position) {
|
||||
this.nuStatements = [];
|
||||
this.isPublic = isPublic;
|
||||
this.pos = pos.getPos();
|
||||
this.pos = pos.sanitize();
|
||||
|
||||
this.onGenerateHooks = [];
|
||||
this.args = [];
|
||||
|
||||
@@ -37,7 +37,7 @@ class Exprs {
|
||||
if (Reflect.hasField(rules, s))
|
||||
Reflect.field(rules, s)
|
||||
else if (s.startsWith('tmp')) {
|
||||
Reflect.setField(rules, s, Macro.tempName(String, '__tink' + s.substr(3)));
|
||||
Reflect.setField(rules, s, MacroApi.tempName('__tink' + s.substr(3)));
|
||||
replace(s);
|
||||
}
|
||||
else s;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package tink.macro;
|
||||
|
||||
import haxe.macro.Expr;
|
||||
using tink.Macro;
|
||||
using tink.MacroApi;
|
||||
|
||||
abstract Member(Field) from Field to Field {
|
||||
static public function prop(name:String, t:ComplexType, pos, ?noread = false, ?nowrite = false):Member {
|
||||
|
||||
@@ -2,7 +2,7 @@ package tink.macro;
|
||||
|
||||
import haxe.macro.Expr;
|
||||
|
||||
using tink.Macro;
|
||||
using tink.MacroApi;
|
||||
|
||||
class Binary {
|
||||
static public function get(o:Binop, e:Expr)
|
||||
|
||||
Reference in New Issue
Block a user