Skip to content

Commit

Permalink
io: remove macroexpand
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon authored and kanaka committed Oct 29, 2024
1 parent d47d0ff commit 78b0d7a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
4 changes: 1 addition & 3 deletions impls/io/step8_macros.io
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ EVAL := method(ast, env,
ast = quasiquote(ast at(1))
continue, // TCO
"defmacro!",
return(env set(ast at(1), EVAL(ast at(2), env) clone setIsMacro(true))),
"macroexpand",
return(macroexpand(ast at(1), env))
return(env set(ast at(1), EVAL(ast at(2), env) clone setIsMacro(true)))
)
)

Expand Down
2 changes: 0 additions & 2 deletions impls/io/step9_try.io
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ EVAL := method(ast, env,
continue, // TCO
"defmacro!",
return(env set(ast at(1), EVAL(ast at(2), env) clone setIsMacro(true))),
"macroexpand",
return(macroexpand(ast at(1), env)),
"try*",
if(ast at(2) == nil, return(EVAL(ast at(1), env)))
e := try(result := EVAL(ast at(1), env))
Expand Down
2 changes: 0 additions & 2 deletions impls/io/stepA_mal.io
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ EVAL := method(ast, env,
continue, // TCO
"defmacro!",
return(env set(ast at(1), EVAL(ast at(2), env) clone setIsMacro(true))),
"macroexpand",
return(macroexpand(ast at(1), env)),
"try*",
if(ast at(2) == nil, return(EVAL(ast at(1), env)))
e := try(result := EVAL(ast at(1), env))
Expand Down

0 comments on commit 78b0d7a

Please sign in to comment.