#NEWLINE# def visit_Call( self , node ) : #NEWLINE# #INDENT# global game #NEWLINE# if ( 'id' in dir ( node . func ) ) : #NEWLINE# #INDENT# self . stack . store ( ) #NEWLINE# if ( len ( node . args ) > 0 ) : #NEWLINE# #INDENT# self . generic_visit ( node . args ) #NEWLINE# args = self . stack . current ( ) #NEWLINE# self . stack . wipe ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# args = [ ] #NEWLINE# #UNINDENT# if ( node . func . id not in game . bitpaks ) : #NEWLINE# #INDENT# obj = getattr ( pynes . bitbag , node . func . id , None ) #NEWLINE# if obj : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# bp = obj ( game ) #NEWLINE# game . bitpaks [ node . func . id ] = bp #NEWLINE# self . stack ( bp ( * args ) ) #NEWLINE# game += bp . asm ( ) #NEWLINE# #UNINDENT# except TypeError as ex : #NEWLINE# #INDENT# msg = ex . message . replace ( '__call__' , node . func . id , 1 ) #NEWLINE# raise TypeError ( msg ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise NameError ( ( "name '%s' is not defined" % game . func . id ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# bp = game . bitpaks [ node . func . id ] #NEWLINE# self . stack ( bp ( * args ) ) #NEWLINE# game += bp . asm ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . generic_visit ( node ) #NEWLINE# attrib = getattr ( self . stack . current ( ) [ 0 ] , self . stack . current ( ) [ 1 ] , None ) #NEWLINE# self . stack . wipe ( ) #NEWLINE# if callable ( attrib ) : #NEWLINE# #INDENT# attrib ( )