This commit consist a series of fixes to make the reach the main
goal of the commit:
* Fix the 'MakeNodeFromExprs' behavior so it returns a pointer
to a node and if the number of input exprs is zero then nil.
* Fix all the eval loop to return immediately in case of any error
duh!
* Add a `errtype` field to `Error` with an `ErrType` enum type
that indicates the type of the error, the type being syntax,
semantic and runtime error at the moment.
* Rename some of the Error functions to match the error type. For
Exapmle `MakeSyntaxError` and `MakeSemanticError`
Implement a new algorithm to eliminate TCO while preventing
premature execution exit by rewriting the evaluation tree and
replacing old nodes with new set of forms, for example the result of
some old form's evaluation, a body of a function or anything in
that nature. Couple the new forms with a possible new execution scope.
* 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.
At this stage we only supports requiring a namespace via it's name
and only one namespace like `(require 'blah.blah)`. But the support
for name aliases and requiring more namespaces at once would be
easy enough.
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.
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.