33
44from .bpf_helper_handler import helper_func_list , handle_helper_call
55from .type_deducer import ctypes_to_ir
6- from .unary_and_binary_ops import handle_binary_op , handle_unary_op
6+ from .binary_ops import handle_binary_op
77
88
99def get_probe_string (func_node ):
@@ -22,17 +22,6 @@ def get_probe_string(func_node):
2222 return arg .value
2323 return "helper"
2424
25- def handle_unary_assign (func , module , builder , stmt , map_sym_tab , local_sym_tab ):
26- """Handle unary assignment statements in the function body."""
27- SyntaxError ("Unary assignment not supported" )
28- target = stmt .target
29- if not isinstance (target , ast .Name ):
30- SyntaxError ("Unsupported assignment target" )
31- return
32- else :
33- handle_unary_op (func , module , builder , stmt , map_sym_tab , local_sym_tab )
34- return
35-
3625def handle_assign (func , module , builder , stmt , map_sym_tab , local_sym_tab ):
3726 """Handle assignment statements in the function body."""
3827 if len (stmt .targets ) != 1 :
@@ -256,7 +245,7 @@ def process_stmt(func, module, builder, stmt, local_sym_tab, map_sym_tab, did_re
256245 elif isinstance (stmt , ast .Assign ):
257246 handle_assign (func , module , builder , stmt , map_sym_tab , local_sym_tab )
258247 elif isinstance (stmt , ast .AugAssign ):
259- handle_unary_assign ( func , module , builder , stmt , map_sym_tab , local_sym_tab )
248+ raise SyntaxError ( "Augmented assignment not supported" )
260249 elif isinstance (stmt , ast .If ):
261250 handle_if (func , module , builder , stmt , map_sym_tab , local_sym_tab )
262251 elif isinstance (stmt , ast .Return ):
0 commit comments