Commit Graph

7 Commits

Author SHA1 Message Date
18f9810070 Move compile::visit mod to crate root
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-21 19:09:48 -04:00
7b470b1e76 Spread out implementations of symbol and attrs-related things, add impl
blocks for TranslateAst

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-21 18:51:54 -04:00
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
98f455e6fa Squash some warnings
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-05-19 15:29:20 -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