result = existing_TOC or TOC()
for node in node_list:
mg_type = type(node).__name__
toc_type = MODULE_TYPES_TO_TOC_DICT[mg_type]
if mg_type == "Script" :
(name, ext) = os.path.splitext(node.filename)
name = os.path.basename(name)
else:
name = node.identifier
path = node.filename if node.filename is not None else ""
result.append( (name, path, toc_type) )
return result
// Return true if the named item is in the graph as a BuiltinModule node.
// The passed name is a basename.
After Change
result = existing_TOC or TOC()
for node in node_list:
result.append(self._node_to_toc(node))
return result
// Return true if the named item is in the graph as a BuiltinModule node.
// The passed name is a basename.