parameters: (self,
                   function,
                   name = "NONE",
                   argument = _null,
                   skeys = _null,
                   path_function = None,
                   # Node.FS.Base so that, by default, it's okay for a
                   # scanner to return a Dir, File or Entry.
                   node_class = SCons.Node.FS.Base,
                   node_factory = None,
                   scan_check = None,
                   recursive = None)
docstring: Construct a new scanner object given a scanner function.
  
          'function' - a scanner function taking two or three
          arguments and returning a list of strings.
  
          'name' - a name for identifying this scanner object.
  
          'argument' - an optional argument that, if specified, will be
          passed to both the scanner function and the path_function.
  
          'skeys' - an optional list argument that can be used to determine
          which scanner should be used for a given Node. In the case of File
          nodes, for example, the 'skeys' would be file suffixes.
  
          'path_function' - a function that takes four or five arguments
          (a construction environment, Node for the directory containing
          the SConscript file that defined the primary target, list of
          target nodes, list of source nodes, and optional argument for
          this instance) and returns a tuple of the directories that can
          be searched for implicit dependency files.  May also return a
          callable() which is called with no args and returns the tuple
          (supporting Bindable class).
  
          'node_class' - the class of Nodes which this scan will return.
          If node_class is None, then this scanner will not enforce any
          Node conversion and will return the raw results from the
          underlying scanner function.
  
          'node_factory' - the factory function to be called to translate
          the raw results returned by the scanner function into the
          expected node_class objects.
  
          'scan_check' - a function to be called to first check whether
          this node really needs to be scanned.
  
          'recursive' - specifies that this scanner should be invoked
          recursively on all of the implicit dependencies it returns
          (the canonical example being #include lines in C source files).
          May be a callable, which will be called to filter the list
          of nodes found to select a subset for recursive scanning
          (the canonical example being only recursively scanning
          subdirectories within a directory).
  
          The scanner function's first argument will be a Node that should
          be scanned for dependencies, the second argument will be an
          Environment object, the third argument will be the tuple of paths
          returned by the path_function, and the fourth argument will be
          the value passed into 'argument', and the returned list should
          contain the Nodes for all the direct dependencies of the file.
  
          Examples:
  
          s = Scanner(my_scanner_function)
  
          s = Scanner(function = my_scanner_function)
  
          s = Scanner(function = my_scanner_function, argument = 'foo')
docstring_summary: Construct a new scanner object given a scanner function.
docstring_tokens: Construct a new scanner object given a scanner function .
function: def __init__(self,
                   function,
                   name = "NONE",
                   argument = _null,
                   skeys = _null,
                   path_function = None,
                   # Node.FS.Base so that, by default, it's okay for a
                   # scanner to return a Dir, File or Entry.
                   node_class = SCons.Node.FS.Base,
                   node_factory = None,
                   scan_check = None,
                   recursive = None):
          """
          Construct a new scanner object given a scanner function.
  
          'function' - a scanner function taking two or three
          arguments and returning a list of strings.
  
          'name' - a name for identifying this scanner object.
  
          'argument' - an optional argument that, if specified, will be
          passed to both the scanner function and the path_function.
  
          'skeys' - an optional list argument that can be used to determine
          which scanner should be used for a given Node. In the case of File
          nodes, for example, the 'skeys' would be file suffixes.
  
          'path_function' - a function that takes four or five arguments
          (a construction environment, Node for the directory containing
          the SConscript file that defined the primary target, list of
          target nodes, list of source nodes, and optional argument for
          this instance) and returns a tuple of the directories that can
          be searched for implicit dependency files.  May also return a
          callable() which is called with no args and returns the tuple
          (supporting Bindable class).
  
          'node_class' - the class of Nodes which this scan will return.
          If node_class is None, then this scanner will not enforce any
          Node conversion and will return the raw results from the
          underlying scanner function.
  
          'node_factory' - the factory function to be called to translate
          the raw results returned by the scanner function into the
          expected node_class objects.
  
          'scan_check' - a function to be called to first check whether
          this node really needs to be scanned.
  
          'recursive' - specifies that this scanner should be invoked
          recursively on all of the implicit dependencies it returns
          (the canonical example being #include lines in C source files).
          May be a callable, which will be called to filter the list
          of nodes found to select a subset for recursive scanning
          (the canonical example being only recursively scanning
          subdirectories within a directory).
  
          The scanner function's first argument will be a Node that should
          be scanned for dependencies, the second argument will be an
          Environment object, the third argument will be the tuple of paths
          returned by the path_function, and the fourth argument will be
          the value passed into 'argument', and the returned list should
          contain the Nodes for all the direct dependencies of the file.
  
          Examples:
  
          s = Scanner(my_scanner_function)
  
          s = Scanner(function = my_scanner_function)
  
          s = Scanner(function = my_scanner_function, argument = 'foo')
  
          """
  
          # Note: this class could easily work with scanner functions that take
          # something other than a filename as an argument (e.g. a database
          # node) and a dependencies list that aren't file names. All that
          # would need to be changed is the documentation.
  
          self.function = function
          self.path_function = path_function
          self.name = name
          self.argument = argument
  
          if skeys is _null:
              if SCons.Util.is_Dict(function):
                  skeys = list(function.keys())
              else:
                  skeys = []
          self.skeys = skeys
  
          self.node_class = node_class
          self.node_factory = node_factory
          self.scan_check = scan_check
          if callable(recursive):
              self.recurse_nodes = recursive
          elif recursive:
              self.recurse_nodes = self._recurse_all_nodes
          else:
              self.recurse_nodes = self._recurse_no_nodes
function_tokens: def __init__ ( self , function , name = "NONE" , argument = _null , skeys = _null , path_function = None , # Node.FS.Base so that, by default, it's okay for a # scanner to return a Dir, File or Entry. node_class = SCons . Node . FS . Base , node_factory = None , scan_check = None , recursive = None ) : # Note: this class could easily work with scanner functions that take # something other than a filename as an argument (e.g. a database # node) and a dependencies list that aren't file names. All that # would need to be changed is the documentation. self . function = function self . path_function = path_function self . name = name self . argument = argument if skeys is _null : if SCons . Util . is_Dict ( function ) : skeys = list ( function . keys ( ) ) else : skeys = [ ] self . skeys = skeys self . node_class = node_class self . node_factory = node_factory self . scan_check = scan_check if callable ( recursive ) : self . recurse_nodes = recursive elif recursive : self . recurse_nodes = self . _recurse_all_nodes else : self . recurse_nodes = self . _recurse_no_nodes