Make D dependency scanner aware of package.d files

This commit is contained in:
SirNickolas 2016-02-08 02:31:45 +06:00 committed by Thomas Nagy
parent 5580e8c69f
commit a61528efc3
1 changed files with 10 additions and 9 deletions

View File

@ -108,16 +108,17 @@ class d_parser(object):
:param filename: file to read
:type filename: string
"""
found = 0
file_path = filename.replace('.', '/')
for n in self.incpaths:
found = n.find_resource(filename.replace('.', '/') + '.d')
if found:
self.nodes.append(found)
self.waiting.append(found)
break
if not found:
if not filename in self.names:
self.names.append(filename)
for suffix in ('.d', '/package.d'):
found = n.find_resource(file_path + suffix)
if found:
self.nodes.append(found)
self.waiting.append(found)
return
if not filename in self.names:
self.names.append(filename)
def get_strings(self, code):
"""