#NEWLINE# def prepareCodeGeneration( tree ) : #NEWLINE# #INDENT# visitor = FinalizeMarkups ( ) #NEWLINE# Operations . visitTree ( tree , visitor ) #NEWLINE# for function in tree . getUsedFunctions ( ) : #NEWLINE# #INDENT# Operations . visitTree ( function , visitor ) #NEWLINE# #UNINDENT# visitor = FinalizeClassClosure ( ) #NEWLINE# for function in tree . getUsedFunctions ( ) : #NEWLINE# #INDENT# if function . hasFlag ( 'has_super' ) : #NEWLINE# #INDENT# Operations . visitFunction ( function , visitor ) #NEWLINE# #UNINDENT# #UNINDENT# visitor = FinalizeClosureTaking ( ) #NEWLINE# for function in tree . getUsedFunctions ( ) : #NEWLINE# #INDENT# Operations . visitFunction ( function , visitor )