add map update function support

This commit is contained in:
2025-09-10 23:44:29 +05:30
parent f830fbe8ba
commit 7de3a381b0
4 changed files with 110 additions and 5 deletions

View File

@ -106,6 +106,18 @@ def handle_expr(func, module, builder, expr, local_sym_tab, map_sym_tab):
handle_helper_call(
call, module, builder, func, local_sym_tab, map_sym_tab)
return
elif isinstance(call.func, ast.Attribute):
if isinstance(call.func.value, ast.Call) and isinstance(call.func.value.func, ast.Name):
method_name = call.func.attr
if method_name in helper_func_list:
handle_helper_call(
call, module, builder, func, local_sym_tab, map_sym_tab)
return
# I VIBED THIS WITHOUT UNDERSTANDING THIS PART>>>> TODO: check this later
if call.func.id in helper_func_list:
handle_helper_call(
call, module, builder, func, local_sym_tab, map_sym_tab)
return
elif isinstance(call, ast.Name):
if call.id in local_sym_tab:
var = local_sym_tab[call.id]