From 255e9647a60d927ef9236938d00bb2e5481a85a7 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Fri, 21 Aug 2015 11:31:39 -0500 Subject: [PATCH] Fix mutability bug --- ml-proto/src/parser.mly | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ml-proto/src/parser.mly b/ml-proto/src/parser.mly index 124296bc4d..bfe4cdba73 100644 --- a/ml-proto/src/parser.mly +++ b/ml-proto/src/parser.mly @@ -50,7 +50,7 @@ type context = {funcs : space; globals : space; locals : space; labels : int VarMap.t} let empty () = {map = VarMap.empty; count = 0} -let c0 = +let c0 () = {funcs = empty (); globals = empty (); locals = empty (); labels = VarMap.empty} @@ -286,7 +286,7 @@ module_fields : {m with data = $3 ^ m.data} } ; modul : - | LPAR MODULE module_fields RPAR { $3 c0 @@ at() } + | LPAR MODULE module_fields RPAR { $3 (c0 ()) @@ at() } ; @@ -295,9 +295,9 @@ modul : cmd : | modul { Define $1 @@ at() } | LPAR INVOKE TEXT expr_list RPAR - { Invoke ($3, $4 c0) @@ at() } + { Invoke ($3, $4 (c0 ())) @@ at() } | LPAR ASSERTEQ LPAR INVOKE TEXT expr_list RPAR expr_list RPAR - { AssertEqInvoke ($5, $6 c0, $8 c0) @@ at() } + { AssertEqInvoke ($5, $6 (c0 ()), $8 (c0 ())) @@ at() } ; cmd_list : | /* empty */ { [] }