Sameer Rahmani
3904d6ef74
Fix couple of linting problems
2021-01-15 20:48:56 +00:00
Sameer Rahmani
09a6d92c08
Replace Tre/False types with a Bool type
2021-01-14 18:17:38 +00:00
Sameer Rahmani
c88c7dad96
Fix some of styling issues through out ast and hash modules
2021-01-14 17:48:39 +00:00
Sameer Rahmani
e26bc00f09
Document the location.go file
2021-01-12 19:01:41 +00:00
Sameer Rahmani
2f6f79fe35
Split up the ast.go into smaller files
2021-01-11 19:03:02 +00:00
Sameer Rahmani
c30c93442b
[Bootstrap] Update the printer functions to enhace the traceback visuals
2021-01-10 17:03:52 +00:00
Sameer Rahmani
c2d4273319
[Bootstrap] Fix the order and location on the traceback
...
In order to fix this issue I had to make many minor tweaks
including reordering the traceback and the way we pass down
nodes.
2021-01-07 19:45:07 +00:00
Sameer Rahmani
e4001e3802
[Bootstrap] Add a basic PrintError function to print error messages with the traceback
2021-01-03 23:42:49 +00:00
Sameer Rahmani
e895377811
[Bootstrap] Update the call stack to container the caller and add a line index to the parser
2021-01-01 19:13:49 +00:00
Sameer Rahmani
9d106d4278
Record the caller details in the stack frame
2020-12-30 17:50:00 +00:00
Sameer Rahmani
9dfe54a573
[Bootstrap]: Add internal instructions with an IExpr interface
2020-12-25 22:01:59 +00:00
Sameer Rahmani
1d66c2a56e
Add support for very basic string implementation
2020-12-16 22:40:59 +00:00
Sameer Rahmani
42058568c7
Add support for native function, multi ns require fn and 'builtins'
...
* Implemented Native function as IExprs so we can refer to them
like any other function. Checkout `NativeFunction`.
* `require` has been implemented as a native functions which
accepts one or more namespace descriptions and load them.
A namespace description is either a symbol with the ns name
or an `IColl` in the following form `(some.ns.name alias).
* A hashmap of strings to native functions has been added to the Runtime
which is used to resolve builtin functions.
2020-12-15 19:08:51 +00:00
Sameer Rahmani
17e35aa2e9
Add the Namespace type to the ast
2020-12-12 20:26:26 +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
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
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
c0fc5b152e
Add the simplest possible Number implementation
2020-11-14 12:22:13 +00:00
Sameer Rahmani
1bd3a41fb6
Create a basic parser in Golang
2020-11-14 10:51:25 +00:00