diff options
author | JJ | 2024-05-17 03:27:10 +0000 |
---|---|---|
committer | JJ | 2024-05-17 08:08:23 +0000 |
commit | 08439ee27125539e66cac4a6f2ddf6488878a601 (patch) | |
tree | bb8ccc8fa0b1b178bfb2041d64c88053dc818d11 /docs/book/TYPES.html | |
parent | 7334c4b65d6722911c20af34f830ddc6c69b57e5 (diff) |
docs: update highlighting
Diffstat (limited to 'docs/book/TYPES.html')
-rw-r--r-- | docs/book/TYPES.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/book/TYPES.html b/docs/book/TYPES.html index 5abe998..1054e03 100644 --- a/docs/book/TYPES.html +++ b/docs/book/TYPES.html @@ -395,15 +395,15 @@ func eval(context: mut HashTable[Ident, Value], expr: Expr): Result[Value] of Variable(ident) then context.get(ident).err("Variable not in context") of Application(body, arg) then - if body of Abstraction(param, body as inner_body): + if body of Abstraction(param, body as inner_body) then context.set(param, context.eval(arg)?) # from std.tables context.eval(inner_body) else Error("Expected Abstraction, found {}".fmt(body)) - of Conditional(condition, then_case, else_case): + of Conditional(condition, then_case, else_case) then if context.eval(condition)? == "true" then context.eval(then_case) - else: + else context.eval(else_case) of expr then Error("Invalid expression {}".fmt(expr)) |