Commit Graph

18 Commits

Author SHA1 Message Date
Sameer Rahmani 688d169286 Add the `let` special form alongside with locatable errors
Add the `let` sform not in the triditional way. In our case
the let scope is available to the bindings. Similar to clojure's let
and let* in triditional sense.

Also add the function `MakeErrorFor` which gets an extra arg, an
`IExpr` and returns an error with the location of that expression.
2020-11-25 19:19:48 +00:00
Sameer Rahmani d86b47c283 Change the `if` special form to use TCO
the bodies of `if` might be utilized for tail call recursion so we
need to run the body inside the TCO loop
2020-11-25 16:41:11 +00:00
Sameer Rahmani 0ef38cd9bd Add the 'do' special form 2020-11-25 16:18:38 +00:00
Sameer Rahmani c2326ae546 Add support for the IF special form 2020-11-25 13:15:19 +00:00
Sameer Rahmani 90888a7bcd Fix the REP loop to terminate early in case of any ParseError 2020-11-24 19:10:01 +00:00
Sameer Rahmani 52fa298a07 Add PrintError function to print out the IError values 2020-11-24 18:39:18 +00:00
Sameer Rahmani eea65489c8 Add True/False values 2020-11-24 18:27:59 +00:00
Sameer Rahmani d92150f0c3 Add IError interface to represent system errors 2020-11-24 18:27:48 +00:00
Sameer Rahmani 57714accfc Add Location type and support to ILocatable 2020-11-23 12:30:02 +00:00
Sameer Rahmani a2725ba412 Add some documentation for the core package 2020-11-20 16:43:07 +00:00
Sameer Rahmani 468b446a4f Enable repl history 2020-11-20 12:33:15 +00:00
Sameer Rahmani 28d7be6efd Create the Block struct to accommodate function bodies 2020-11-19 22:17:50 +00:00
Sameer Rahmani 680017f0ce Add the Def, and Fn special forms 2020-11-19 19:14:06 +00:00
Sameer Rahmani ad37f02742 Restructure the source tree to get around circular dep issue 2020-11-15 22:16:48 +00:00
Sameer Rahmani cba74e29af Add the support for special forms 2020-11-15 21:38:09 +00:00
Sameer Rahmani 38baf577bb Move reader and printer packages to the core package 2020-11-15 19:33:16 +00:00
Sameer Rahmani 95ec031ce6 Add a very basic eval function for symbols 2020-11-15 19:30:07 +00:00
Sameer Rahmani a7457fceb6 Create a very basic runtime/ns/scope with a basic repl 2020-11-14 21:09:54 +00:00