Commit Graph

25 Commits

Author SHA1 Message Date
amirrezaask 2143938705 add wrapped error 2020-12-05 14:43:49 +03:30
amirrezaask b37afd25d4 add .Error method to error struct 2020-12-05 13:37:04 +03:30
Sameer Rahmani 31a4cfb765 Add support for macros via defmacro
Added the support for normal macro (in compare to reader macros and
other types) expansion with out quasiquote support. The quasiquote
will be added as a recursive macro itself.
2020-12-04 21:08:48 +00:00
Sameer Rahmani 211e977430 Add 'quote' special form 2020-11-26 12:03:46 +00:00
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
Sameer Rahmani c0fc5b152e Add the simplest possible Number implementation 2020-11-14 12:22:13 +00:00
Sameer Rahmani 70bb8d1997 Fix the reader bug in readUnquotedExpr function 2020-11-14 11:02:09 +00:00
Sameer Rahmani 1bd3a41fb6 Create a basic parser in Golang 2020-11-14 10:51:25 +00:00