Browse Source

fixed empty block parsing

Nicolas Cannasse 6 năm trước cách đây
mục cha
commit
c7df796eb1
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      hxsl/MacroParser.hx

+ 2 - 0
hxsl/MacroParser.hx

@@ -242,6 +242,8 @@ class MacroParser {
 			ESwitch(parseExpr(e), [for( c in cases ) { expr : c.expr == null ? { expr : EBlock([]), pos : c.values[0].pos } : parseExpr(c.expr), values : [for( v in c.values ) parseExpr(v)] }], def == null ? null : parseExpr(def));
 			ESwitch(parseExpr(e), [for( c in cases ) { expr : c.expr == null ? { expr : EBlock([]), pos : c.values[0].pos } : parseExpr(c.expr), values : [for( v in c.values ) parseExpr(v)] }], def == null ? null : parseExpr(def));
 		case EWhile(cond, e, normalWhile):
 		case EWhile(cond, e, normalWhile):
 			EWhile(parseExpr(cond), parseExpr(e), normalWhile);
 			EWhile(parseExpr(cond), parseExpr(e), normalWhile);
+		case EObjectDecl([]):
+			EBlock([]);
 		default:
 		default:
 			null;
 			null;
 		};
 		};