소스 검색

Respect hscriptPos flag for shader live reload (#1256)

* fix: Respect hscriptPos flag for shader live reload
* fix: hscriptPos flag on JS without sys
Pavel Alexandrov 8 달 전
부모
커밋
8599a33b3d
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      hxsl/SharedShader.hx

+ 5 - 1
hxsl/SharedShader.hx

@@ -346,7 +346,11 @@ class SharedShader {
 		#else
 		var parser = new hscript.Parser();
 		var m = try parser.parseModule(text,fs.path) catch( e : hscript.Expr.Error ) {
-			Sys.println(e.toString());
+			#if sys
+			Sys.println(hscript.Printer.errorToString(e));
+			#else
+			trace(hscript.Printer.errorToString(e));
+			#end
 			return null;
 		}
 		var clName = name.split(".").pop();