Skip to content

Commit

Permalink
[lang0] evaluate -- FnRecursive
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Apr 3, 2024
1 parent 6a89411 commit 8fd0d36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

> 支持直接递归函数与相互递归函数,不能判断等价的地方就不判断。
[lang0] `evaluate` -- `FnRecursive`
[lang0] add an extra pass -- `defineMod` before `executeMod`
[lang0] `equivalent` -- `FnRecursive`
[lang0] `doAp` should not apply a `FnRecursive` when the `arg` is `NotYet`
Expand Down
4 changes: 4 additions & 0 deletions src/lang0/evaluate/evaluate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export function evaluate(mod: Mod, env: Env, exp: Exp): Value {
return Values.Fn(mod, env, exp.name, exp.ret)
}

case "FnRecursive": {
return Values.FnRecursive(mod, env, exp.recursiveName, exp.name, exp.ret)
}

case "FnRecursive": {
throw new Error("TODO")
}
Expand Down

0 comments on commit 8fd0d36

Please sign in to comment.