Add has_handler to HelperHandlerRegistry

This commit is contained in:
Pragyansh Chaturvedi
2025-10-01 23:38:38 +05:30
parent 28cc0c5eec
commit 929eef31ef
3 changed files with 11 additions and 6 deletions

View File

@ -23,6 +23,11 @@ class HelperHandlerRegistry:
"""Get the handler function for a helper"""
return cls._handlers.get(helper_name)
@classmethod
def has_handler(cls, helper_name):
"""Check if a handler function is registered for a helper"""
return helper_name in cls._handlers
def get_var_ptr_from_name(var_name, local_sym_tab):
"""Get a pointer to a variable from the symbol table."""