type qname = string list * string
class type table = object
- method mem_symbol : qname -> bool
- method mem_method : string -> bool
+ method mem_symbol : qname -> bool
+ method mem_method : string -> bool
end
type env = {
methods = methods'}
| `Open { Node.value = name}->
(* fixme *)
- {env with opened = name::env.opened}, stmt
+ {env with opened = (env.current @ name)::env.opened}, stmt
let bind table program =
let env = {
opened = [["std"]];
table = (table :> table) } in
snd @@ map_accum_left (bind_stmt `All) env program
-
-
attrs = attrs;
methods = Hashtbl.find_all tbl (nss,name)
}]
- | `DefineMethod _ | `DefineStaticMethod _ | `Open _ ->
+ | `DefineMethod _ | `DefineStaticMethod _ ->
[]
| #Ast.expr_stmt as s ->
let rec lift f s =
[lift (call_to_invoke table)
(`Module {m with
Ast.stmts = List.concat m.Ast.stmts})]
+ | `Open _ as s ->
+ [s]
end
nss s