X-Git-Url: https://code.kerkeslager.com/?p=fur;a=blobdiff_plain;f=generation.py;h=4bcf1380f899dfd0aaf8ed2b2412317079523774;hp=a1e85f15b88e017e37b80e85bcc9e15529103769;hb=74c7456042282dd86f9be673cbd1e00496b28710;hpb=b059a00e0e2511a2ca2477db1e91d53fc5d2ec0f diff --git a/generation.py b/generation.py index a1e85f1..4bcf138 100644 --- a/generation.py +++ b/generation.py @@ -66,10 +66,10 @@ def generate_negation_expression(c_negation_expression): def generate_function_call(function_call): # TODO This gets called twice, which is really inefficient--normalization would also allow other clauses besides a variable reference - get_closure_clause = 'Environment_get(environment, "{}").instance.closure'.format( - function_call.name, - ) - return '{}.call(environmentPool, {}.closed, {}, {})'.format( + # TODO This should no longer be called "name", as it can be an expression of a few types + # TODO Check the type of the things being called + get_closure_clause = generate_expression(function_call.name) + return '{}.instance.closure.call(environmentPool, {}.instance.closure.closed, {}, {})'.format( get_closure_clause, get_closure_clause, function_call.argument_count,