Bladeren bron

even more printer fixes

Simon Krajewski 11 jaren geleden
bovenliggende
commit
9984497128
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      std/haxe/macro/Printer.hx

+ 2 - 2
std/haxe/macro/Printer.hx

@@ -184,11 +184,11 @@ class Printer {
 			var s = 'switch ${printExpr(e1)} {\n$tabs' +
 			var s = 'switch ${printExpr(e1)} {\n$tabs' +
 				cl.map(function(c)
 				cl.map(function(c)
 					return 'case ${printExprs(c.values, ", ")}'
 					return 'case ${printExprs(c.values, ", ")}'
-						+ (c.guard != null ? ' if(${printExpr(c.guard)}): ' : ":")
+						+ (c.guard != null ? ' if (${printExpr(c.guard)}):' : ":")
 						+ (c.expr != null ? (opt(c.expr, printExpr)) + ";" : ""))
 						+ (c.expr != null ? (opt(c.expr, printExpr)) + ";" : ""))
 				.join('\n$tabs');
 				.join('\n$tabs');
 			if (edef != null)
 			if (edef != null)
-				s += '\n${tabs}default: ' + (edef.expr == null ? "" : printExpr(edef) + ";");
+				s += '\n${tabs}default:' + (edef.expr == null ? "" : printExpr(edef) + ";");
 			tabs = old;
 			tabs = old;
 			s + '\n$tabs}';
 			s + '\n$tabs}';
 		case ETry(e1, cl):
 		case ETry(e1, cl):