mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-27 09:08:48 +00:00
Switched to the new GT
This commit is contained in:
parent
72c963f60f
commit
1ac302ac46
2 changed files with 8 additions and 7 deletions
11
src/SM.ml
11
src/SM.ml
|
|
@ -153,12 +153,13 @@ let compile (defs, p) =
|
|||
env, true, tag @ List.flatten (List.rev code) @ [DROP]
|
||||
and bindings p =
|
||||
let bindings =
|
||||
fix0 (fun fself ->
|
||||
transform(Stmt.Pattern.t)
|
||||
(object inherit [int list, (string * int list) list] @Stmt.Pattern.t
|
||||
method c_Wildcard path _ = []
|
||||
method c_Ident path _ s = [s, path]
|
||||
method c_Sexp path x _ ps = List.concat @@ List.mapi (fun i p -> x.GT.f (path @ [i]) p) ps
|
||||
end)
|
||||
(object inherit [int list, (string * int list) list, _] @Stmt.Pattern.t
|
||||
method c_Wildcard path = []
|
||||
method c_Ident path s = [s, path]
|
||||
method c_Sexp path x ps = List.concat @@ List.mapi (fun i p -> fself (path @ [i]) p) ps
|
||||
end))
|
||||
[]
|
||||
p
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue