Commit Graph

61 Commits

Author SHA1 Message Date
ef38680fe5 Add Vm::frames(&self) function
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-14 16:37:16 -07:00
fdbb0a1307 Add some base VM implementations
Some instructions are currently implemented. Others are not. This is
mostly just a checkpoint so I can implement lexical name definitions.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-14 16:32:58 -07:00
372e58f620 Fold runtime/ crate into this source tree
While I like the idea of having a runtime completely decoupled from the
syntax and compiler, I don't think this is that big of a project for
that to be necessary or even useful yet.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-14 14:14:21 -07:00
8e2cbb10a4 General changes across the runtime crate in support of compile module
* Compile module is able to compile bytecode (or so it seems...)
* Runtime crate has had some new stuff added to it, mostly with objects
  and vtables. Still not 100% on the object method function call story,
  but I guess it'll be tackled when we get there.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-14 14:09:29 -07:00
e2c43dc911 Add LhsExpr parsing
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-03 18:58:22 -07:00
4d8a815ffc Remove old TODO from parser grammar
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-03 18:49:53 -07:00
c42b63e016 Add Body AST item and visit_body in visitor
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-03 18:47:48 -07:00
f8819279f8 Fix parser for index and call exprs, remove old test that didn't work, add visitor pattern
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-03 18:32:22 -07:00
2fd340a688 Add lexer, parser, ast, and basic command line interaction
* Add lexer and parser using lrpar crate
* AST is added and constructed via lexer and parser
* Command line program `not` will read a file and parse it

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-02 14:40:43 -07:00
c25a3b5e2b Add Cargo.toml, forgot it in the last commit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-02 14:40:40 -07:00
178ed4a952 Initial commit
Includes: runtime base from a previous project, syn(tax) module with
parser and lexer

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-09-01 17:32:48 -07:00