3
3
4
4
from .bpf_helper_handler import helper_func_list , handle_helper_call
5
5
from .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
7
7
8
8
9
9
def get_probe_string (func_node ):
@@ -22,17 +22,6 @@ def get_probe_string(func_node):
22
22
return arg .value
23
23
return "helper"
24
24
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
-
36
25
def handle_assign (func , module , builder , stmt , map_sym_tab , local_sym_tab ):
37
26
"""Handle assignment statements in the function body."""
38
27
if len (stmt .targets ) != 1 :
@@ -256,7 +245,7 @@ def process_stmt(func, module, builder, stmt, local_sym_tab, map_sym_tab, did_re
256
245
elif isinstance (stmt , ast .Assign ):
257
246
handle_assign (func , module , builder , stmt , map_sym_tab , local_sym_tab )
258
247
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" )
260
249
elif isinstance (stmt , ast .If ):
261
250
handle_if (func , module , builder , stmt , map_sym_tab , local_sym_tab )
262
251
elif isinstance (stmt , ast .Return ):
0 commit comments