A basic compiler based off of thejameskyle's super-tiny-compiler

Matt Coles d4d04be185 Create README.md il y a 9 ans
.gitignore a1ab34b0e4 Add some example code il y a 9 ans
README.md d4d04be185 Create README.md il y a 9 ans
compiler.js cbf5475de5 My first compiler :) il y a 9 ans
example.mc a1ab34b0e4 Add some example code il y a 9 ans
stdlib.js dec28251e2 Add some runtime error checking il y a 9 ans

README.md

babys-first-compiler

A basic compiler based off of @thejameskyle's super-tiny-compiler, compiles a simple LISP-esque syntax into runnable JS.

Currently supports a few built-ins, add, subtract, assign and log. Hopefully these are self-explanatory, or at least they should be from example.mc.

The compiler runs like node compiler.js file.mc where file.mc is the file you wish to compile, and this will produce an output.js which requires stdlib.js to be in the same directory when running for now at least.