Skip to content

Commit

Permalink
Merge pull request #18 from WebAssembly/fix-mutability
Browse files Browse the repository at this point in the history
Fix mutability bug
  • Loading branch information
rossberg committed Aug 21, 2015
2 parents b2a3120 + 255e964 commit aa0564c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ml-proto/src/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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() }
;
Expand All @@ -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 */ { [] }
Expand Down

0 comments on commit aa0564c

Please sign in to comment.