Apply
This commit is contained in:
parent
34cffe1661
commit
22b0811cbe
1 changed files with 4 additions and 1 deletions
|
@ -226,7 +226,10 @@ let translate (p : S.t) env =
|
||||||
let bfs, b = expression env b in
|
let bfs, b = expression env b in
|
||||||
afs @ bfs, T.Define (identifier id, a, b)
|
afs @ bfs, T.Define (identifier id, a, b)
|
||||||
| S.RecFunctions _ -> failwith "Students! This is your job (S.RecFunctions)!")
|
| S.RecFunctions _ -> failwith "Students! This is your job (S.RecFunctions)!")
|
||||||
| S.Apply (a, bs) -> failwith "Students! This is your job (S.Apply)!"
|
| S.Apply (a, bs) ->
|
||||||
|
let afs, a = expression env a in
|
||||||
|
let bsfs, bs = expressions env bs in
|
||||||
|
afs @ bsfs, T.UnknownFunCall (a, bs)
|
||||||
| S.IfThenElse (a, b, c) ->
|
| S.IfThenElse (a, b, c) ->
|
||||||
let afs, a = expression env a in
|
let afs, a = expression env a in
|
||||||
let bfs, b = expression env b in
|
let bfs, b = expression env b in
|
||||||
|
|
Reference in a new issue