@@ -732,11 +732,11 @@ elem_expr_list :
732
732
elem_var_list :
733
733
| var_list
734
734
{ let f = function {at; _} as x -> [ref_func x @@ at] @@ at in
735
- fun c lookup -> List.map f ($1 c lookup ) }
735
+ fun c -> List.map f ($1 c func ) }
736
736
737
737
elem_list :
738
738
| elem_kind elem_var_list
739
- { ($1, fun c -> $2 c func ) }
739
+ { ($1, fun c -> $2 c) }
740
740
| ref_type elem_expr_list
741
741
{ ($1, fun c -> $2 c) }
742
742
@@ -768,7 +768,7 @@ elem :
768
768
{ let at = at () in
769
769
fun c -> ignore ($3 c anon_elem bind_elem);
770
770
fun () ->
771
- { etype = FuncRefType; einit = $5 c func ;
771
+ { etype = FuncRefType; einit = $5 c;
772
772
emode = Active {index = 0l @@ at; offset = $4 c} @@ at } @@ at }
773
773
774
774
table :
@@ -788,19 +788,19 @@ table_fields :
788
788
| inline_export table_fields /* Sugar */
789
789
{ fun c x at -> let tabs, elems, ims, exs = $2 c x at in
790
790
tabs, elems, ims, $1 (TableExport x) c :: exs }
791
- | ref_type LPAR ELEM elem_var_list RPAR /* Sugar */
791
+ | ref_type LPAR ELEM elem_expr elem_expr_list RPAR /* Sugar */
792
792
{ fun c x at ->
793
793
let offset = [i32_const (0l @@ at) @@ at] @@ at in
794
- let einit = $4 c func in
794
+ let einit = $4 c :: $5 c in
795
795
let size = Lib.List32.length einit in
796
796
let emode = Active {index = x; offset} @@ at in
797
797
[{ttype = TableType ({min = size; max = Some size}, $1)} @@ at],
798
- [{etype = FuncRefType ; einit; emode} @@ at],
798
+ [{etype = $1 ; einit; emode} @@ at],
799
799
[], [] }
800
- | ref_type LPAR ELEM elem_expr elem_expr_list RPAR /* Sugar */
800
+ | ref_type LPAR ELEM elem_var_list RPAR /* Sugar */
801
801
{ fun c x at ->
802
802
let offset = [i32_const (0l @@ at) @@ at] @@ at in
803
- let einit = (fun c -> $4 c :: $5 c) c in
803
+ let einit = $4 c in
804
804
let size = Lib.List32.length einit in
805
805
let emode = Active {index = x; offset} @@ at in
806
806
[{ttype = TableType ({min = size; max = Some size}, $1)} @@ at],
0 commit comments