File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -685,12 +685,14 @@ def ast(self,
685685 if astblock .has_return :
686686 instr = astblock .last_instruction
687687 rv = instr .return_value ()
688+ astexpr : Optional [AST .ASTExpr ] = None
688689 if rv is not None and not astree .returns_void ():
689- astexpr : Optional [ AST . ASTExpr ] = XU .xxpr_to_ast_def_expr (
690+ astexpr = XU .xxpr_to_ast_def_expr (
690691 rv , instr .xdata , instr .iaddr , astree )
691- else :
692- astexpr = None
693- # astexpr = astexprs[0] if len(astexprs) == 1 else None
692+ if rv .is_string_reference :
693+ cstr = rv .constant .string_reference ()
694+ straddr = hex (rv .constant .value )
695+ astexpr = astree .mk_string_constant (astexpr , cstr , straddr )
694696 rtnstmt = astree .mk_return_stmt (astexpr , instr .iaddr , instr .bytestring )
695697 blockstmts [n ] = [blocknode , rtnstmt ]
696698 else :
You can’t perform that action at this time.
0 commit comments