parameters: (target, source)
return_statement: return dict
docstring: Create a dictionary for substitution of special
      construction variables.
  
      This translates the following special arguments:
  
      target - the target (object or array of objects),
               used to generate the TARGET and TARGETS
               construction variables
  
      source - the source (object or array of objects),
               used to generate the SOURCES and SOURCE
               construction variables
docstring_summary: Create a dictionary for substitution of special
      construction variables.
docstring_tokens: Create a dictionary for substitution of special construction variables .
function: def subst_dict(target, source):
      """Create a dictionary for substitution of special
      construction variables.
  
      This translates the following special arguments:
  
      target - the target (object or array of objects),
               used to generate the TARGET and TARGETS
               construction variables
  
      source - the source (object or array of objects),
               used to generate the SOURCES and SOURCE
               construction variables
      """
      dict = {}
  
      if target:
          def get_tgt_subst_proxy(thing):
              try:
                  subst_proxy = thing.get_subst_proxy()
              except AttributeError:
                  subst_proxy = thing # probably a string, just return it
              return subst_proxy
          tnl = NLWrapper(target, get_tgt_subst_proxy)
          dict['TARGETS'] = Targets_or_Sources(tnl)
          dict['TARGET'] = Target_or_Source(tnl)
  
          # This is a total cheat, but hopefully this dictionary goes
          # away soon anyway.  We just let these expand to $TARGETS
          # because that's "good enough" for the use of ToolSurrogates
          # (see test/ToolSurrogate.py) to generate documentation.
          dict['CHANGED_TARGETS'] = '$TARGETS'
          dict['UNCHANGED_TARGETS'] = '$TARGETS'
      else:
          dict['TARGETS'] = NullNodesList
          dict['TARGET'] = NullNodesList
  
      if source:
          def get_src_subst_proxy(node):
              try:
                  rfile = node.rfile
              except AttributeError:
                  pass
              else:
                  node = rfile()
              try:
                  return node.get_subst_proxy()
              except AttributeError:
                  return node     # probably a String, just return it
          snl = NLWrapper(source, get_src_subst_proxy)
          dict['SOURCES'] = Targets_or_Sources(snl)
          dict['SOURCE'] = Target_or_Source(snl)
  
          # This is a total cheat, but hopefully this dictionary goes
          # away soon anyway.  We just let these expand to $TARGETS
          # because that's "good enough" for the use of ToolSurrogates
          # (see test/ToolSurrogate.py) to generate documentation.
          dict['CHANGED_SOURCES'] = '$SOURCES'
          dict['UNCHANGED_SOURCES'] = '$SOURCES'
      else:
          dict['SOURCES'] = NullNodesList
          dict['SOURCE'] = NullNodesList
  
      return dict
function_tokens: def subst_dict ( target , source ) : dict = { } if target : def get_tgt_subst_proxy ( thing ) : try : subst_proxy = thing . get_subst_proxy ( ) except AttributeError : subst_proxy = thing # probably a string, just return it return subst_proxy tnl = NLWrapper ( target , get_tgt_subst_proxy ) dict [ 'TARGETS' ] = Targets_or_Sources ( tnl ) dict [ 'TARGET' ] = Target_or_Source ( tnl ) # This is a total cheat, but hopefully this dictionary goes # away soon anyway.  We just let these expand to $TARGETS # because that's "good enough" for the use of ToolSurrogates # (see test/ToolSurrogate.py) to generate documentation. dict [ 'CHANGED_TARGETS' ] = '$TARGETS' dict [ 'UNCHANGED_TARGETS' ] = '$TARGETS' else : dict [ 'TARGETS' ] = NullNodesList dict [ 'TARGET' ] = NullNodesList if source : def get_src_subst_proxy ( node ) : try : rfile = node . rfile except AttributeError : pass else : node = rfile ( ) try : return node . get_subst_proxy ( ) except AttributeError : return node # probably a String, just return it snl = NLWrapper ( source , get_src_subst_proxy ) dict [ 'SOURCES' ] = Targets_or_Sources ( snl ) dict [ 'SOURCE' ] = Target_or_Source ( snl ) # This is a total cheat, but hopefully this dictionary goes # away soon anyway.  We just let these expand to $TARGETS # because that's "good enough" for the use of ToolSurrogates # (see test/ToolSurrogate.py) to generate documentation. dict [ 'CHANGED_SOURCES' ] = '$SOURCES' dict [ 'UNCHANGED_SOURCES' ] = '$SOURCES' else : dict [ 'SOURCES' ] = NullNodesList dict [ 'SOURCE' ] = NullNodesList return dict