#NEWLINE# def generatePrintValueCode( statement , emit , context ) : #NEWLINE# #INDENT# destination = statement . getDestination ( ) #NEWLINE# value = statement . getValue ( ) #NEWLINE# if ( destination is not None ) : #NEWLINE# #INDENT# dest_name = context . allocateTempName ( 'print_dest' , unique = True ) #NEWLINE# generateExpressionCode ( expression = destination , to_name = dest_name , emit = emit , context = context ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# dest_name = None #NEWLINE# #UNINDENT# value_name = context . allocateTempName ( 'print_value' , unique = True ) #NEWLINE# generateExpressionCode ( expression = value , to_name = value_name , emit = emit , context = context ) #NEWLINE# old_source_ref = context . setCurrentSourceCodeReference ( statement . getSourceReference ( ) ) #NEWLINE# if ( dest_name is not None ) : #NEWLINE# #INDENT# print_code = ( 'PRINT_ITEM_TO( %s, %s ) == false' % ( dest_name , value_name ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print_code = ( 'PRINT_ITEM( %s ) == false' % ( value_name , ) ) #NEWLINE# #UNINDENT# getErrorExitBoolCode ( condition = print_code , emit = emit , context = context ) #NEWLINE# getReleaseCodes ( release_names = ( dest_name , value_name ) , emit = context , context = context ) #NEWLINE# context . setCurrentSourceCodeReference ( old_source_ref )