#NEWLINE# def find( self , name ) : #NEWLINE# #INDENT# match = re . match ( '(.*)\\(.*\\)(.*)' , name ) #NEWLINE# while match : #NEWLINE# #INDENT# name = ( match . group ( 1 ) + match . group ( 2 ) ) #NEWLINE# match = re . match ( '(.*)\\(.*\\)(.*)' , name ) #NEWLINE# #UNINDENT# path = None #NEWLINE# if ( '/' in name ) : #NEWLINE# #INDENT# path = name . split ( '/' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( '.' in name ) : #NEWLINE# #INDENT# path = name . split ( '.' ) #NEWLINE# #UNINDENT# #UNINDENT# if path : #NEWLINE# #INDENT# constructName = path [ 0 ] #NEWLINE# memberName = path [ 1 ] #NEWLINE# argumentName = ( path [ 2 ] if ( 2 < len ( path ) ) else memberName ) #NEWLINE# for construct in reversed ( self . constructs ) : #NEWLINE# #INDENT# if ( constructName == construct . name ) : #NEWLINE# #INDENT# if ( 1 == len ( path ) ) : #NEWLINE# #INDENT# return construct #NEWLINE# #UNINDENT# for member in reversed ( construct ) : #NEWLINE# #INDENT# if ( memberName == member . name ) : #NEWLINE# #INDENT# if ( 2 < len ( path ) ) : #NEWLINE# #INDENT# argument = member . findArgument ( argumentName ) #NEWLINE# if argument : #NEWLINE# #INDENT# return argument #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return match #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( 2 == len ( path ) ) : #NEWLINE# #INDENT# argument = construct . findArgument ( argumentName , False ) #NEWLINE# if argument : #NEWLINE# #INDENT# return argument #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return None #NEWLINE# #UNINDENT# for construct in reversed ( self . constructs ) : #NEWLINE# #INDENT# if ( name == construct . name ) : #NEWLINE# #INDENT# return construct #NEWLINE# #UNINDENT# #UNINDENT# for construct in reversed ( self . constructs ) : #NEWLINE# #INDENT# member = construct . findMember ( name ) #NEWLINE# if member : #NEWLINE# #INDENT# return member #NEWLINE# #UNINDENT# #UNINDENT# for construct in reversed ( self . constructs ) : #NEWLINE# #INDENT# argument = construct . findArgument ( name ) #NEWLINE# if argument : #NEWLINE# #INDENT# return argument #NEWLINE# #UNINDENT# #UNINDENT# return None