Commit Graph

7 Commits

Author SHA1 Message Date
9704e07c45 Add call stack error chain
This allows us to write out errors that follow the call stack and give
locations to where errors originated.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-16 15:25:58 -08:00
2752bdf6d3 Add source string to Span
This is the path to the location that this span is pointing to. This is
usually going to be a file path, but it can really be anything you want.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-16 14:40:09 -08:00
effa99e65d Add Stmt and incorporate meta statements
This helps split up expressions, meta calls (like includes) that can be
expanded into more expressions.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-16 14:14:50 -08:00
90f27a4108 Add branching and more coherent method of function calls
We're turing-complete, babey!

* Call stack for functions now differentiates between native and quote
  calls
* Better API for builtin functions allowing for more control
* Example showing off branches

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-12 21:49:41 -08:00
907c8ce1af Move src/syn/word.rs to src/scope.rs; add BuiltinFn
* crate::scope instead of crate::syn::word, which makes more sense
  because scopes are not really used in syntax at all
* Reference-counted BuiltinFn values are available for creation now

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-12 18:00:11 -08:00
1c669decc4 Finally have things printing to the screen
Nothing fancy yet. This commit adds a bunch of stuff (oops):

* compiling code
* VM with instructions
* remove eval.rs and just eval in the Machine struct itself
* squash most warnings now that we're using stuff here

And probably more. But that's all for now folks

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-12 17:35:48 -08:00
9e20dcf59c Add parser, vm, objects
Big ol thing. You should check it out sometime

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-01-07 20:30:55 -08:00