diff --git a/interpreter/dune-project b/interpreter/dune-project index 8392b339..4c048f55 100644 --- a/interpreter/dune-project +++ b/interpreter/dune-project @@ -7,9 +7,7 @@ (implicit_transitive_deps false) (license Apache-2.0) - -(source - (github WebAssembly/spec)) +(source (github WebAssembly/spec)) (authors "Andreas Rossberg = 4.12)) - (menhir (>= 20220210)))) + (menhir (>= 20220210)) + ) +) diff --git a/interpreter/text/parser.mly b/interpreter/text/parser.mly index 3747df89..71ee2a92 100644 --- a/interpreter/text/parser.mly +++ b/interpreter/text/parser.mly @@ -375,8 +375,8 @@ val_type : | ref_type { fun c -> RefT ($1 c) } val_type_list : - | /* empty */ { 0l, fun c -> [] } - | val_type val_type_list { I32.add (fst $2) 1l, fun c -> $1 c :: snd $2 c } + | list(val_type) + { Lib.List32.length $1, fun c -> List.map (fun f -> f c) $1 } global_type : | val_type { fun c -> GlobalT (Cons, $1 c) }