Commit Graph

14 Commits

Author SHA1 Message Date
0e85435635 Better? type management
Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-11-15 18:25:38 +09:00
3c5b03a2a8 Cleaned code
- removed dereferences
- help function only provide info for the first symbol

Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-11-15 17:42:23 +09:00
f240d31f27 Created core file
- keep core functions in a different file
- I can return custom values UwU

Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-11-14 20:55:28 +09:00
a3d402fed2 Improved file loading and repl
- multiple line instruction
- multiple intstruction line

Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-11-13 22:08:55 +09:00
21a7c9e695 Implementing side-stuff
- 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>
2023-10-25 15:31:44 +09:00
88e9964d9a Recursion finally works
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>
2023-08-06 18:26:08 +02:00
24a42d5628 Implemented fn* special form
- 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>
2023-07-27 16:50:45 +02:00
fc7328167a Added do form
Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-07-26 18:33:30 +02:00
67a9c6d0ae Implementing conditional and integer comparators
- 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>
2023-07-24 23:31:42 +02:00
148196dae5 Change code syntax to make it a bit better
Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-07-08 12:48:53 +02:00
d7173c393c Implemented let* special function
Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-06-21 12:17:31 +02:00
3456a62879 Implemented def!
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>
2023-06-18 01:00:00 +02:00
c8e83ee7a8 Moving to (hopefully) proper references 2023-06-14 00:45:51 +02:00
fe92bbcaa1 Preparing to implement multiple environments
Signed-off-by: teo3300 <matteo.rogora@live.it>
2023-06-13 23:59:39 +02:00