parameters: (self, pattern, fn, n)
return_statement: return key
docstring: Mark all definitions matching a specified pattern with a reference.
docstring_summary: Mark all definitions matching a specified pattern with a reference.
docstring_tokens: Mark all definitions matching a specified pattern with a reference .
function: def mark_matching_resources(self, pattern, fn, n):
          "Mark all definitions matching a specified pattern with a reference."
          pattern = pattern.replace("+", r"\+")
          pattern = os.sep + pattern + "$"
          if os.sep == "\\":
              pattern = pattern.replace("\\", "\\\\")
          try:
              pattern = re.compile(pattern)
          except sre_constants.error:
              print("wmlscope: confused by %s" % pattern, file=sys.stderr)
              return None
          key = None
          for trial in self.fileref:
              if pattern.search(trial) and self.visible_from(trial, fn, n):
                  key = trial
                  self.fileref[key].append(fn, n)
          return key
function_tokens: def mark_matching_resources ( self , pattern , fn , n ) : pattern = pattern . replace ( "+" , r"\+" ) pattern = os . sep + pattern + "$" if os . sep == "\\" : pattern = pattern . replace ( "\\" , "\\\\" ) try : pattern = re . compile ( pattern ) except sre_constants . error : print ( "wmlscope: confused by %s" % pattern , file = sys . stderr ) return None key = None for trial in self . fileref : if pattern . search ( trial ) and self . visible_from ( trial , fn , n ) : key = trial self . fileref [ key ] . append ( fn , n ) return key