Skip to content

Commit 02885af

Browse files
committed
Add binops to eval_expr
1 parent e6e2a69 commit 02885af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pythonbpf/expr_pass.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ def eval_expr(
153153
)
154154
elif isinstance(expr, ast.Attribute):
155155
return _handle_attribute_expr(expr, local_sym_tab, structs_sym_tab, builder)
156+
elif isinstance(expr, ast.BinOp):
157+
from pythonbpf.binary_ops import handle_binary_op
158+
159+
return handle_binary_op(expr, builder, None, local_sym_tab)
156160
logger.info("Unsupported expression evaluation")
157161
return None
158162

0 commit comments

Comments
 (0)