From 86378d6cc41c890a142acb7af9d97655fcc55312 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 8 Oct 2025 06:11:59 +0530 Subject: [PATCH] Add BoolOp handling stub in eval_expr --- pythonbpf/expr_pass.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pythonbpf/expr_pass.py b/pythonbpf/expr_pass.py index 2c734ea..98e208a 100644 --- a/pythonbpf/expr_pass.py +++ b/pythonbpf/expr_pass.py @@ -315,6 +315,18 @@ def _handle_unary_op( return result, ir.IntType(1) +def _handle_boolean_op( + func, + module, + builder, + expr: ast.BoolOp, + local_sym_tab, + map_sym_tab, + structs_sym_tab=None, +): + pass + + def eval_expr( func, module, @@ -403,6 +415,10 @@ def eval_expr( return _handle_unary_op( func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab ) + elif isinstance(expr, ast.BoolOp): + return _handle_boolean_op( + func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab + ) logger.info("Unsupported expression evaluation") return None