aboutsummaryrefslogtreecommitdiff
path: root/bash/step7_quote.sh
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-23 21:59:50 -0500
committerJoel Martin <github@martintribe.org>2014-04-23 21:59:50 -0500
commit6301e0b6374cecc5599665be14d6ddc6a31ce1e8 (patch)
treedbf1dc2ff6c682fd87c72a7907e7f6e59c8d4c03 /bash/step7_quote.sh
parent89bd4de1e2704c1bc562788b2c5e4fc08b71a538 (diff)
downloadmal-6301e0b6374cecc5599665be14d6ddc6a31ce1e8.tar.gz
mal-6301e0b6374cecc5599665be14d6ddc6a31ce1e8.zip
All: TCO let* and quasiquote.
Diffstat (limited to 'bash/step7_quote.sh')
-rwxr-xr-xbash/step7_quote.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/bash/step7_quote.sh b/bash/step7_quote.sh
index f1a91ca..8319f64 100755
--- a/bash/step7_quote.sh
+++ b/bash/step7_quote.sh
@@ -109,15 +109,18 @@ EVAL () {
ENV_SET "${let_env}" "${ANON["${let_pairs[${idx}]}"]}" "${r}"
idx=$(( idx + 2))
done
- EVAL "${a2}" "${let_env}"
- return ;;
+ ast="${a2}"
+ env="${let_env}"
+ # Continue loop
+ ;;
quote)
r="${a1}"
return ;;
quasiquote)
QUASIQUOTE "${a1}"
- EVAL "${r}" "${env}"
- return ;;
+ ast="${r}"
+ # Continue loop
+ ;;
do) _count "${ast}"
_slice "${ast}" 1 $(( ${r} - 2 ))
EVAL_AST "${r}" "${env}"