소스 검색

[display] make some methods under `#if macro` visible in display mode (fixes #6000)

Alexander Kuzmenko 7 년 전
부모
커밋
cdfe207bad
4개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      std/haxe/macro/CompilationServer.hx
  2. 1 1
      std/haxe/macro/Context.hl.hx
  3. 1 1
      std/haxe/macro/ExampleJSGenerator.hx
  4. 1 1
      std/haxe/macro/Format.hx

+ 1 - 1
std/haxe/macro/CompilationServer.hx

@@ -50,7 +50,7 @@ abstract ModuleCheckPolicy(Int) {
 	`--macro server.field(args)`.
 **/
 class CompilationServer {
-	#if macro
+	#if (macro || display)
 
 	/**
 		Sets the `ModuleCheckPolicy` of all files whose dot-path matches an

+ 1 - 1
std/haxe/macro/Context.hl.hx

@@ -27,7 +27,7 @@ import haxe.macro.Type.TypedExpr;
 @:noDoc @:hlNative("macro")
 class Context {
 
-#if macro
+#if (macro || display)
 
 	public static function error( msg : String, pos : Position ) : Dynamic {
 		return null;

+ 1 - 1
std/haxe/macro/ExampleJSGenerator.hx

@@ -244,7 +244,7 @@ class ExampleJSGenerator {
 		sys.io.File.saveContent(api.outputFile, buf.toString());
 	}
 
-	#if macro
+	#if (macro || display)
 	public static function use() {
 		Compiler.setCustomJSGenerator(function(api) new ExampleJSGenerator(api).generate());
 	}

+ 1 - 1
std/haxe/macro/Format.hx

@@ -28,7 +28,7 @@ import haxe.macro.Context;
 **/
 class Format {
 
-	#if macro
+	#if (macro || display)
 	public static function format( estr : Expr ) {
 		var str = switch( estr.expr ) {
 			case EConst(c): switch(c) { case CString(s): s; default: null; }