mirror of
https://github.com/kanaka/mal.git
synced 2024-09-19 17:47:53 +03:00
parent
9c7a452efa
commit
920963d69f
@ -22,6 +22,7 @@ proc eval_ast(ast: MalType, env: var Env): MalType =
|
||||
proc eval(ast: MalType, env: var Env): MalType =
|
||||
case ast.kind
|
||||
of List:
|
||||
if ast.list.len == 0: return ast
|
||||
let
|
||||
a0 = ast.list[0]
|
||||
a1 = ast.list[1]
|
||||
|
@ -22,6 +22,7 @@ proc eval_ast(ast: MalType, env: var Env): MalType =
|
||||
proc eval(ast: MalType, env: var Env): MalType =
|
||||
case ast.kind
|
||||
of List:
|
||||
if ast.list.len == 0: return ast
|
||||
let a0 = ast.list[0]
|
||||
case a0.kind
|
||||
of Symbol:
|
||||
|
@ -34,6 +34,7 @@ proc eval(ast: MalType, env: var Env): MalType =
|
||||
|
||||
while true:
|
||||
if ast.kind != List: return ast.eval_ast(env)
|
||||
if ast.list.len == 0: return ast
|
||||
|
||||
let a0 = ast.list[0]
|
||||
case a0.kind
|
||||
|
@ -34,6 +34,7 @@ proc eval(ast: MalType, env: var Env): MalType =
|
||||
|
||||
while true:
|
||||
if ast.kind != List: return ast.eval_ast(env)
|
||||
if ast.list.len == 0: return ast
|
||||
|
||||
let a0 = ast.list[0]
|
||||
case a0.kind
|
||||
|
@ -48,6 +48,7 @@ proc eval(ast: MalType, env: var Env): MalType =
|
||||
|
||||
while true:
|
||||
if ast.kind != List: return ast.eval_ast(env)
|
||||
if ast.list.len == 0: return ast
|
||||
|
||||
let a0 = ast.list[0]
|
||||
case a0.kind
|
||||
|
Loading…
Reference in New Issue
Block a user