working towards function overloading, the emitted functions and function calls are now decorated and we're starting to get the prereqs for function lookup

This commit is contained in:
Nathan Braswell
2016-01-13 21:09:28 -05:00
parent cb5b072b58
commit fe6818edfc
5 changed files with 48 additions and 7 deletions

View File

@@ -943,6 +943,14 @@ fun get_ast_scope(node: *ast_node): *map<string,vector<*ast_node>> {
ast_node::value() return &node->value.scope
}
}
fun get_ast_type(node: *ast_node): *type {
match (*node) {
ast_node::identifier() return node->identifier.type
ast_node::function() return node->function.type
ast_node::function_call() return get_ast_type(node->function_call.func)
ast_node::value() return node->value.value_type
}
}
fun ast_to_dot(root: *ast_node): string {
var ret = string("digraph Kaken {\n")