m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-19 23:13:41 -0400
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-19 23:40:18 -0400
commitbe3415a7cb219fe0244e726ccd0f232485672ed6 (patch)
tree79d4f567116da67b82e93a162e0f67cd2dc6a8d0 /index.js
parent3fccdd3d61d96d3c979f72c7a9d9c26420ae3656 (diff)
Lex and parse explosions
Diffstat (limited to 'index.js')
-rw-r--r--index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.js b/index.js
index 8cdfe1e..3b858a2 100644
--- a/index.js
+++ b/index.js
@@ -7,6 +7,8 @@ const interpret = tree => {
return D.constant(tree.value)
case 'd':
return D.d(interpret(tree.left), interpret(tree.right))
+ case 'E':
+ return D.explode(interpret(tree.left), interpret(tree.right))
case 'add':
return D.add(interpret(tree.left), interpret(tree.right))
case 'subtract':