Переглянути джерело

No TParenthesis TArrayDecl in blocks

From this:
```
bla;
(blah());
[blah(), blah(), blah()];
[1,hi(),3];
bla;
```
to this:
```
bla;
blah();
blah(); blah(); blah();
hi();
bla;
```
PeyTy 10 роки тому
батько
коміт
4994cade39
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      genlua.ml

+ 2 - 0
genlua.ml

@@ -772,6 +772,8 @@ and gen_block_element ?(after=false) ctx e =
     begin match e.eexpr with
     begin match e.eexpr with
 	| TTypeExpr _ -> ()
 	| TTypeExpr _ -> ()
 	| TCast (ce,_) -> gen_block_element ctx ce
 	| TCast (ce,_) -> gen_block_element ctx ce
+	| TParenthesis pe -> gen_block_element ctx pe
+	| TArrayDecl el -> concat ctx " " (gen_block_element ctx) el;
 	| TBinop (op,e1,e2) when op <> Ast.OpAssign ->
 	| TBinop (op,e1,e2) when op <> Ast.OpAssign ->
 		let f () = gen_tbinop ctx op e1 e2 in
 		let f () = gen_tbinop ctx op e1 e2 in
 		gen_iife_assign ctx f;
 		gen_iife_assign ctx f;