Browse Source

fix for future haxe ops not breaking hxsl

Nicolas Cannasse 3 years ago
parent
commit
850be0e545
2 changed files with 2 additions and 13 deletions
  1. 1 7
      hxsl/Eval.hx
  2. 1 6
      hxsl/Printer.hx

+ 1 - 7
hxsl/Eval.hx

@@ -413,13 +413,7 @@ class Eval {
 			case OpLt: compare(function(x) return x < 0);
 			case OpLte: compare(function(x) return x <= 0);
 			case OpInterval, OpAssign, OpAssignOp(_): TBinop(op, e1, e2);
-			case OpArrow: throw "assert";
-			#if (haxe_ver >= 4)
-			case OpIn: throw "assert";
-			#end
-			#if (haxe_ver >= "4.3.0")
-			case OpNullCoal: throw "assert";
-			#end
+			default: throw "assert";
 			}
 		case TUnop(op, e):
 			var e = evalExpr(e);

+ 1 - 6
hxsl/Printer.hx

@@ -327,12 +327,7 @@ class Printer {
 		case OpAssignOp(op):opStr(op) + "=";
 		case OpArrow:"=>";
 		case OpInterval:"...";
-		#if (haxe_ver >= 4)
-		case OpIn: " in ";
-		#end
-		#if (haxe_ver >= "4.3.0")
-		case OpNullCoal: "??";
-		#end
+		default: "??"+op;
 		}
 	}