parse context from first function argument to local symbol table

This commit is contained in:
2025-10-22 11:38:52 +05:30
parent adf32560a0
commit b3921c424d
8 changed files with 64 additions and 8 deletions

View File

@ -2,7 +2,6 @@ import ast
import logging
import importlib
import inspect
import llvmlite.ir as ir
from .assignment_info import AssignmentInfo, AssignmentType
from .dependency_handler import DependencyHandler

View File

@ -39,6 +39,16 @@ class VmlinuxHandler:
and self.vmlinux_symtab[name]["value_type"] == AssignmentType.CONSTANT
)
def get_vmlinux_struct_type(self, name):
"""Check if name is a vmlinux struct type"""
if (
name in self.vmlinux_symtab
and self.vmlinux_symtab[name]["value_type"] == AssignmentType.STRUCT
):
return self.vmlinux_symtab[name]["python_type"]
else:
raise ValueError(f"{name} is not a vmlinux struct type")
def is_vmlinux_struct(self, name):
"""Check if name is a vmlinux struct"""
return (