add error for unsupported constant

This commit is contained in:
Pragyansh Chaturvedi
2025-09-11 01:33:56 +05:30
parent 393aaeaef5
commit ef502bcc9f
2 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,8 @@ def handle_assign(func, module, builder, stmt, map_sym_tab, local_sym_tab):
local_sym_tab[var_name])
# local_sym_tab[var_name] = var
print(f"Assigned constant {rval.value} to {var_name}")
else:
print("Unsupported constant type")
elif isinstance(rval, ast.Call):
if isinstance(rval.func, ast.Name):
call_type = rval.func.id