mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 04:22:41 +00:00
added closures
This commit is contained in:
parent
34c279ec2e
commit
b425a59db5
5 changed files with 59 additions and 28 deletions
|
|
@ -6,8 +6,7 @@ module Hashtbl = struct
|
|||
let contains tbl key = find_opt tbl key |> Option.is_some
|
||||
end
|
||||
|
||||
type env_table = (string, lox_value) Hashtbl.t
|
||||
type environment = { globals : env_table ref; locals : env_table list }
|
||||
type environment = Value.environment
|
||||
|
||||
module Env = struct
|
||||
type t = environment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue