Re:Super Tiny Compiler
by callumlocke on Thursday March 31, 2016 @03:33PM
(#11399919)
What languages are the input and output? Or is that a stupid question?
[ Parent
| on HN ]
Re:Super Tiny Compiler
by thejameskyle on Thursday March 31, 2016 @05:08PM
(#11400561)
No stupid questions.. I keep getting similar feedback. I'll do a better job of explaining it.
To answer your question, it's taking a lisp-style syntax and turning it into a C-style syntax (specifically JavaScript- the output AST is actually a valid Babel AST)
(add 2 (subtract 4 2))
Into
add(2, subtract(4, 2))