A Ruby language with Lisp syntax.
The compilation process:
- Read the Lisp source code from a file.
- Parse the source into an abstract syntax tree made up of Ruby objects.
- Transform and optimise the AST if need be.
- Convert the AST into strings of Ruby code.
- Write the strings to files.
To compile an emerald file e.g example.emerald
, run:
ruby emerald.rb example.emerald
The evaluated code will be output to the console, and the generated Ruby code will be can be found in compiled_lisp.rb
To run all tests, run:
rspec spec
To run linting with Rubocop, run:
bundle exec rubocop