d_scan

Provide a scanner for finding dependencies on d files

waflib.Tools.d_scan.filter_comments(filename)[source]
Parameters:

filename (string) – d file name

Return type:

list

Returns:

a list of characters

class waflib.Tools.d_scan.d_parser(env, incpaths)[source]

Parser for d files

tryfind(filename)[source]

Search file a file matching an module/import directive

Parameters:

filename (string) – file to read

get_strings(code)[source]
Parameters:

code (string) – d code to parse

Returns:

the modules that the code uses

Return type:

a list of match objects

start(node)[source]

The parsing starts here

Parameters:

node (waflib.Node.Node) – input file

iter(node)[source]

Find all the modules that a file depends on, uses waflib.Tools.d_scan.d_parser.tryfind() to process dependent files

Parameters:

node (waflib.Node.Node) – input file

__dict__ = mappingproxy({'__module__': 'waflib.Tools.d_scan', '__firstlineno__': 85, '__doc__': '\nParser for d files\n', '__init__': <function d_parser.__init__>, 'tryfind': <function d_parser.tryfind>, 'get_strings': <function d_parser.get_strings>, 'start': <function d_parser.start>, 'iter': <function d_parser.iter>, '__static_attributes__': ('allnames', 'env', 'incpaths', 'module', 'names', 'nodes', 're_import', 're_import_alias', 're_import_bindings', 're_module', 'waiting'), '__dict__': <attribute '__dict__' of 'd_parser' objects>, '__weakref__': <attribute '__weakref__' of 'd_parser' objects>, '__annotations__': {}})
__firstlineno__ = 85
__static_attributes__ = ('allnames', 'env', 'incpaths', 'module', 'names', 'nodes', 're_import', 're_import_alias', 're_import_bindings', 're_module', 'waiting')
waflib.Tools.d_scan.scan(self)[source]

look for .d/.di used by a d file