#NEWLINE# def consume( self , t , src , state ) : #NEWLINE# #INDENT# code = self . language ( ) . comment ( self . shortStr ( ) ) #NEWLINE# assignment_template = _cgenv . get_template ( 'assignment.cpp' ) #NEWLINE# dst_name = self . newtuple . name #NEWLINE# dst_type_name = self . newtuple . getTupleTypename ( ) #NEWLINE# code += _cgenv . get_template ( 'tuple_declaration.cpp' ) . render ( locals ( ) ) #NEWLINE# for ( dst_fieldnum , src_label_expr ) in enumerate ( self . emitters ) : #NEWLINE# #INDENT# dst_set_func = self . newtuple . set_func_code ( dst_fieldnum ) #NEWLINE# ( src_label , src_expr ) = src_label_expr #NEWLINE# src_expr_unnamed = expression . ensure_unnamed ( src_expr , self . input ) #NEWLINE# ( src_expr_compiled , expr_decls , expr_inits ) = self . language ( ) . compile_expression ( src_expr_unnamed , tupleref = t ) #NEWLINE# state . addInitializers ( expr_inits ) #NEWLINE# state . addDeclarations ( expr_decls ) #NEWLINE# code += assignment_template . render ( locals ( ) ) #NEWLINE# #UNINDENT# innercode = self . parent ( ) . consume ( self . newtuple , self , state ) #NEWLINE# code += innercode #NEWLINE# return code