parameters: (self, defn, fn, n)
docstring: Is specified definition visible from the specified file and line?
docstring_summary: Is specified definition visible from the specified file and line?
docstring_tokens: Is specified definition visible from the specified file and line?
function: def visible_from(self, defn, fn, n):
          "Is specified definition visible from the specified file and line?"
          if isinstance(defn, str):
              defn = self.fileref[defn]
          if defn.undef is not None:
              # Local macros are only visible in the file where they were defined
              return defn.filename == fn and n >= defn.lineno and n <= defn.undef
          if self.exports(defn.namespace):
              # Macros and resources in subtrees with export=yes are global
              return True
          elif not self.filelist.neighbors(defn.filename, fn):
              # Otherwise, must be in the same subtree.
              return False
          else:
              # If the two files are in the same subtree, assume visibility.
              # This doesn't match the actual preprocessor semantics.
              # It means any macro without an undef is visible anywhere in the
              # same argument directory.
              #
              # We can't do better than this without a lot of hairy graph-
              # coloring logic to simulate include path interpretation.
              # If that logic ever gets built, it will go here.
              return True
function_tokens: def visible_from ( self , defn , fn , n ) : if isinstance ( defn , str ) : defn = self . fileref [ defn ] if defn . undef is not None : # Local macros are only visible in the file where they were defined return defn . filename == fn and n >= defn . lineno and n <= defn . undef if self . exports ( defn . namespace ) : # Macros and resources in subtrees with export=yes are global return True elif not self . filelist . neighbors ( defn . filename , fn ) : # Otherwise, must be in the same subtree. return False else : # If the two files are in the same subtree, assume visibility. # This doesn't match the actual preprocessor semantics. # It means any macro without an undef is visible anywhere in the # same argument directory. # # We can't do better than this without a lot of hairy graph- # coloring logic to simulate include path interpretation. # If that logic ever gets built, it will go here. return True