#NEWLINE# def visit_term( self , node , children ) : #NEWLINE# #INDENT# '\n        Divides or multiplies factors.\n        Factor nodes will be already evaluated.\n        ' #NEWLINE# if self . debug : #NEWLINE# #INDENT# print ( 'Term {}' . format ( children ) ) #NEWLINE# #UNINDENT# term = children [ 0 ] #NEWLINE# for i in range ( 2 , len ( children ) , 2 ) : #NEWLINE# #INDENT# if ( children [ ( i - 1 ) ] == '*' ) : #NEWLINE# #INDENT# term *= children [ i ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# term /= children [ i ] #NEWLINE# #UNINDENT# #UNINDENT# if self . debug : #NEWLINE# #INDENT# print ( 'Term = {}' . format ( term ) ) #NEWLINE# #UNINDENT# return term