fix function parsing

This commit is contained in:
Ilya Rezvov
2018-02-24 20:36:11 -08:00
parent d69f0fed99
commit 254bfca5f8
+2 -2
View File
@@ -790,8 +790,8 @@ signature_locals_body1 :: { Function }
| 'param' ident valtype ')' signature_locals_body { | 'param' ident valtype ')' signature_locals_body {
prependFuncParams [ParamType (Just $2) $3] $5 prependFuncParams [ParamType (Just $2) $3] $5
} }
| 'result' list(valtype) ')' signature_locals_body { | 'result' list(valtype) ')' locals_body {
prependFuncResults $2 $4 prependFuncResults $2 $ emptyFunction { locals = fst $4, body = snd $4 }
} }
| locals_body1 { | locals_body1 {
emptyFunction { locals = fst $1, body = snd $1 } emptyFunction { locals = fst $1, body = snd $1 }