- Added error severity, mainly to distinguish between READ and EVAL
errors, can be later expanded to allow other distinction
- Improved repl using the above function (EVAL errors interrupts the
repl right away, without the need to double-return)
- Added an helper function to provide infos about builtin and composed
functions
- Possibility to pass files as arguments to setup the environment
Signed-off-by: teo3300 <matteo.rogora@live.it>
Switched from Box to Rc (Yeah, I peeked at solution but I understood Rc
and RefCell just now) to allow multiple references to env data
Signed-off-by: teo3300 <matteo.rogora@live.it>
- Don't really like how it is behaving: turning expressions into a list
of expression and evaluating them separately
Signed-off-by: teo3300 <matteo.rogora@live.it>
- added `init` function, will be used later to implement functions
- moved `car_cdr` to `types.rs`
- improved some error messages
- implemented `do` and `if` special forms
- implemented comparison between numeric values (integers)
- improved comment
Signed-off-by: teo3300 <matteo.rogora@live.it>
Implemented `def!` to define new symbols into the current
environment, still need to implement `let*`
Added some helper functon for the eval phase
Defined a macro for more readable environment initialization
Signed-off-by: teo3300 <matteo.rogora@live.it>