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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user