working on moving rest of obj stuff into obj_lower

This commit is contained in:
Nathan Braswell
2017-11-03 00:39:58 -04:00
parent 5b8ef4ce2e
commit cb720e5cd6
9 changed files with 295 additions and 144 deletions

View File

@@ -12,6 +12,10 @@ import io:*
import type:*
adt ast_node {
translation_unit: translation_unit,
import: import,
@@ -1070,7 +1074,9 @@ obj value (Object) {
fun get_ast_children(node: *ast_node): vector<*ast_node> {
match (*node) {
ast_node::translation_unit(backing) return backing.children + backing.lambdas
// Don't get lambdas, let them come up naturally in passes (so can get enclosing function and stuff)
/*ast_node::translation_unit(backing) return backing.children + backing.lambdas*/
ast_node::translation_unit(backing) return backing.children
ast_node::import(backing) return vector<*ast_node>()
ast_node::identifier(backing) return vector<*ast_node>()
ast_node::type_def(backing) return backing.variables + backing.methods