aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-13 15:36:02 -0500
committerJoel Martin <github@martintribe.org>2014-04-13 15:36:02 -0500
commit8adb082743f12402d0817018ab1e8ff0c0e4729e (patch)
treeba3c69589adfb799c71190ede43ab5cefceda6f6 /js
parent3e8a088f48ea6030191c15457aafdd1b30387ca0 (diff)
downloadmal-8adb082743f12402d0817018ab1e8ff0c0e4729e.tar.gz
mal-8adb082743f12402d0817018ab1e8ff0c0e4729e.zip
Java, JS: cleanup and sync steps.
- Java: less direct use of obj.value attribute.
Diffstat (limited to 'js')
-rw-r--r--js/step5_tco.js2
-rw-r--r--js/step6_file.js2
-rw-r--r--js/step7_quote.js10
-rw-r--r--js/step8_macros.js10
-rw-r--r--js/step9_interop.js10
-rw-r--r--js/stepA_more.js10
6 files changed, 30 insertions, 14 deletions
diff --git a/js/step5_tco.js b/js/step5_tco.js
index 9ba7a98..dbeaa90 100644
--- a/js/step5_tco.js
+++ b/js/step5_tco.js
@@ -68,7 +68,7 @@ function _EVAL(ast, env) {
case "fn*":
return types._function(EVAL, Env, a2, env, a1);
default:
- var el = eval_ast(ast, env), f = el[0], meta = f.__meta__;
+ var el = eval_ast(ast, env), f = el[0];
if (f.__ast__) {
ast = f.__ast__;
env = f.__gen_env__(el.slice(1));
diff --git a/js/step6_file.js b/js/step6_file.js
index ab4ba2f..ee39501 100644
--- a/js/step6_file.js
+++ b/js/step6_file.js
@@ -68,7 +68,7 @@ function _EVAL(ast, env) {
case "fn*":
return types._function(EVAL, Env, a2, env, a1);
default:
- var el = eval_ast(ast, env), f = el[0], meta = f.__meta__;
+ var el = eval_ast(ast, env), f = el[0];
if (f.__ast__) {
ast = f.__ast__;
env = f.__gen_env__(el.slice(1));
diff --git a/js/step7_quote.js b/js/step7_quote.js
index 3125083..6782647 100644
--- a/js/step7_quote.js
+++ b/js/step7_quote.js
@@ -23,9 +23,13 @@ function quasiquote(ast) {
} else if (ast[0].value === 'unquote') {
return ast[1];
} else if (is_pair(ast[0]) && ast[0][0].value === 'splice-unquote') {
- return [types._symbol("concat"), ast[0][1], quasiquote(ast.slice(1))];
+ return [types._symbol("concat"),
+ ast[0][1],
+ quasiquote(ast.slice(1))];
} else {
- return [types._symbol("cons"), quasiquote(ast[0]), quasiquote(ast.slice(1))];
+ return [types._symbol("cons"),
+ quasiquote(ast[0]),
+ quasiquote(ast.slice(1))];
}
}
@@ -88,7 +92,7 @@ function _EVAL(ast, env) {
case "fn*":
return types._function(EVAL, Env, a2, env, a1);
default:
- var el = eval_ast(ast, env), f = el[0], meta = f.__meta__;
+ var el = eval_ast(ast, env), f = el[0];
if (f.__ast__) {
ast = f.__ast__;
env = f.__gen_env__(el.slice(1));
diff --git a/js/step8_macros.js b/js/step8_macros.js
index 190cadc..f50bba4 100644
--- a/js/step8_macros.js
+++ b/js/step8_macros.js
@@ -23,9 +23,13 @@ function quasiquote(ast) {
} else if (ast[0].value === 'unquote') {
return ast[1];
} else if (is_pair(ast[0]) && ast[0][0].value === 'splice-unquote') {
- return [types._symbol("concat"), ast[0][1], quasiquote(ast.slice(1))];
+ return [types._symbol("concat"),
+ ast[0][1],
+ quasiquote(ast.slice(1))];
} else {
- return [types._symbol("cons"), quasiquote(ast[0]), quasiquote(ast.slice(1))];
+ return [types._symbol("cons"),
+ quasiquote(ast[0]),
+ quasiquote(ast.slice(1))];
}
}
@@ -112,7 +116,7 @@ function _EVAL(ast, env) {
case "fn*":
return types._function(EVAL, Env, a2, env, a1);
default:
- var el = eval_ast(ast, env), f = el[0], meta = f.__meta__;
+ var el = eval_ast(ast, env), f = el[0];
if (f.__ast__) {
ast = f.__ast__;
env = f.__gen_env__(el.slice(1));
diff --git a/js/step9_interop.js b/js/step9_interop.js
index 0fd7044..4987931 100644
--- a/js/step9_interop.js
+++ b/js/step9_interop.js
@@ -23,9 +23,13 @@ function quasiquote(ast) {
} else if (ast[0].value === 'unquote') {
return ast[1];
} else if (is_pair(ast[0]) && ast[0][0].value === 'splice-unquote') {
- return [types._symbol("concat"), ast[0][1], quasiquote(ast.slice(1))];
+ return [types._symbol("concat"),
+ ast[0][1],
+ quasiquote(ast.slice(1))];
} else {
- return [types._symbol("cons"), quasiquote(ast[0]), quasiquote(ast.slice(1))];
+ return [types._symbol("cons"),
+ quasiquote(ast[0]),
+ quasiquote(ast.slice(1))];
}
}
@@ -118,7 +122,7 @@ function _EVAL(ast, env) {
case "fn*":
return types._function(EVAL, Env, a2, env, a1);
default:
- var el = eval_ast(ast, env), f = el[0], meta = f.__meta__;
+ var el = eval_ast(ast, env), f = el[0];
if (f.__ast__) {
ast = f.__ast__;
env = f.__gen_env__(el.slice(1));
diff --git a/js/stepA_more.js b/js/stepA_more.js
index 6a2b949..a4fe21a 100644
--- a/js/stepA_more.js
+++ b/js/stepA_more.js
@@ -23,9 +23,13 @@ function quasiquote(ast) {
} else if (ast[0].value === 'unquote') {
return ast[1];
} else if (is_pair(ast[0]) && ast[0][0].value === 'splice-unquote') {
- return [types._symbol("concat"), ast[0][1], quasiquote(ast.slice(1))];
+ return [types._symbol("concat"),
+ ast[0][1],
+ quasiquote(ast.slice(1))];
} else {
- return [types._symbol("cons"), quasiquote(ast[0]), quasiquote(ast.slice(1))];
+ return [types._symbol("cons"),
+ quasiquote(ast[0]),
+ quasiquote(ast.slice(1))];
}
}
@@ -129,7 +133,7 @@ function _EVAL(ast, env) {
case "fn*":
return types._function(EVAL, Env, a2, env, a1);
default:
- var el = eval_ast(ast, env), f = el[0], meta = f.__meta__;
+ var el = eval_ast(ast, env), f = el[0];
if (f.__ast__) {
ast = f.__ast__;
env = f.__gen_env__(el.slice(1));