Commit Graph

11 Commits

Author SHA1 Message Date
161166da15 Add symbol collection visitor
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-20 15:24:40 -04:00
499e09b254 Move compile::Ctx to its own mod, compile::ctx::Ctx
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-20 14:51:30 -04:00
32591f5e29 Update how visitors work, add NameId type
* Visitors are now defined on a per-type level, allowing for greater
  flexibility in combining and re-using behavior
* NameId is used for namespaces, which are used to index locally scoped
  variables. Syms are used for free namespaces, specifically in objects.
  All NameIDs are symbols, while not all symbols are NameIDs.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-20 14:41:12 -04:00
8dc89f7153 Add a lot of new stuff to the compile mod
* compile::sym is now compile::name
* add basic block structure
* add visitor pattern
* some other minor things (e.g. syn::ast::prelude)

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-19 15:26:38 -04:00
d5cf39108b Changes all around - objects and GC
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-16 18:46:09 -04:00
a15dde0fc2 Add vm and compile modules
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-16 12:56:52 -04:00
ccb12306d4 Add mem and obj modules, move to nightly
* mem and obj modules are roughly divided between doing memory-specific
  things and object-specific things
* Box::new_uninit() is a nightly feature and it's quite useful, so I'm
  enabling that for now
* Check out src/obj/attrs.rs for possible undefined behavior in the
  Attrs::new() function. I'm sure it'll be just fine.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-14 17:10:53 -04:00
e233ff1cfc Clean up warnings, update next_body, add more tests
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-08 16:19:01 -04:00
e7e8690463 Add structopt and base argument parsing
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-07 18:31:08 -04:00
d9edf21d16 Add expression parsing
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-02 18:42:01 -04:00
58421a0469 Initial commit with lexer
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-04-27 12:42:17 -04:00