From 02885af1cae5e69b45783ff3f14dad18486824cc Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Mon, 6 Oct 2025 03:36:44 +0530 Subject: [PATCH] Add binops to eval_expr --- pythonbpf/expr_pass.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pythonbpf/expr_pass.py b/pythonbpf/expr_pass.py index 40d0800..9ceb77f 100644 --- a/pythonbpf/expr_pass.py +++ b/pythonbpf/expr_pass.py @@ -153,6 +153,10 @@ def eval_expr( ) elif isinstance(expr, ast.Attribute): return _handle_attribute_expr(expr, local_sym_tab, structs_sym_tab, builder) + elif isinstance(expr, ast.BinOp): + from pythonbpf.binary_ops import handle_binary_op + + return handle_binary_op(expr, builder, None, local_sym_tab) logger.info("Unsupported expression evaluation") return None