Просмотр исходного кода

make some TypedExprTools methods available in non-macro context

Simon Krajewski 10 лет назад
Родитель
Сommit
972cc5dfce
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      std/haxe/macro/TypedExprTools.hx

+ 2 - 4
std/haxe/macro/TypedExprTools.hx

@@ -22,12 +22,9 @@
 
 
 package haxe.macro;
 package haxe.macro;
 
 
-import haxe.macro.Context;
 import haxe.macro.Type;
 import haxe.macro.Type;
 
 
 class TypedExprTools {
 class TypedExprTools {
-	#if macro
-
 	static function with(e:TypedExpr, ?edef:TypedExprDef, ?t:Type) {
 	static function with(e:TypedExpr, ?edef:TypedExprDef, ?t:Type) {
 		return {
 		return {
 			expr: edef == null ? e.expr : edef,
 			expr: edef == null ? e.expr : edef,
@@ -152,8 +149,9 @@ class TypedExprTools {
 		}
 		}
 	}
 	}
 
 
+	#if macro
 	static public function toString(t:TypedExpr, ?pretty = false):String {
 	static public function toString(t:TypedExpr, ?pretty = false):String {
-		return new String(Context.load("s_expr", 2)(t, pretty));
+		return new String(haxe.macro.Context.load("s_expr", 2)(t, pretty));
 	}
 	}
 	#end
 	#end
 }
 }