#NEWLINE# def desugar_line( self , line , line_num , program_file , program_ast ) : #NEWLINE# #INDENT# indentation = utils . get_indentation ( line ) #NEWLINE# line = line [ len ( indentation ) : ] #NEWLINE# function = [ api_call for api_call in self . api_calls if ( ( '.' + api_call ) in line ) ] #NEWLINE# assert ( len ( function ) == 1 ) #NEWLINE# if ( function [ 0 ] == 'p' ) : #NEWLINE# #INDENT# desugared_line = self . scribe ( line , program_ast ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( function [ 0 ] == 'watch' ) : #NEWLINE# #INDENT# desugared_line = self . watch ( line , line_num , program_file , program_ast ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( function [ 0 ] == 'iterscribe' ) : #NEWLINE# #INDENT# desugared_line = self . iterscribe ( line , line_num , indentation , program_ast ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( function [ 0 ] == 'd' ) : #NEWLINE# #INDENT# desugared_line = self . distinguish ( line , program_ast ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# desugared_line = '' #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( not desugared_line ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# ( action , ending ) = self . action_and_ending ( line_num ) #NEWLINE# if self . show_lines : #NEWLINE# #INDENT# output = ( ( ( action + self . from_line ( line_num ) ) + desugared_line ) + ending ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# output = ( ( action + desugared_line ) + ending ) #NEWLINE# #UNINDENT# if ( len ( indentation ) > 0 ) : #NEWLINE# #INDENT# output = ( indentation + output ) #NEWLINE# #UNINDENT# return output