More work. Doesn't compile at this point

This commit is contained in:
Nathan Braswell
2017-02-23 01:24:22 -05:00
parent cb8124afc0
commit 8a676a1b5b
3 changed files with 42 additions and 4 deletions

View File

@@ -797,6 +797,8 @@ obj ast_transformation (Object) {
// don't bother with a full transform for parameters with their own function, just get the boolean expression and transform it
var parameters = get_nodes("parameter", node).map(fun(child: *tree<symbol>): *ast_node return transform(get_node("boolean_expression", child), scope, template_replacements);)
var parameter_types = parameters.map(fun(param: *ast_node): *type return get_ast_type(param);)
if (parameter_types.any_true(fun(ptype: *type): bool return !ptype;))
error(node, "One of the parameter types is null!")
var func = transform(get_node("unarad", node), scope, search_type::function(parameter_types), template_replacements)
// may return an identifier of type object if doing operator() - but the () have been stripped out by importer
var func_type = get_ast_type(func)