mirror of
https://github.com/dlang/tools.git
synced 2025-04-27 13:40:22 +03:00
Update DustMite
Commits: * 9abec53 dustmite: Use std.digest.md * 135b7d5 dsplit: Parse directives (#-lines)
This commit is contained in:
parent
e184f13a45
commit
3c1f0c8027
2 changed files with 7 additions and 8 deletions
|
@ -259,9 +259,9 @@ Entity[] parseD(string s)
|
|||
{
|
||||
// Here be dragons.
|
||||
|
||||
enum MAX_SPLITTER_LEVELS = 5;
|
||||
enum MAX_SPLITTER_LEVELS = 6;
|
||||
struct DSplitter { char open, close, sep; }
|
||||
static const DSplitter[MAX_SPLITTER_LEVELS] splitters = [{'{','}',';'}, {'(',')'}, {'[',']'}, {sep:','}, {sep:' '}];
|
||||
static const DSplitter[MAX_SPLITTER_LEVELS] splitters = [{'#','\n'}, {'{','}',';'}, {'(',')'}, {'[',']'}, {sep:','}, {sep:' '}];
|
||||
|
||||
Entity[][MAX_SPLITTER_LEVELS] splitterQueue;
|
||||
|
||||
|
|
|
@ -855,22 +855,21 @@ version(HAVE_AE)
|
|||
}
|
||||
else
|
||||
{
|
||||
import std.md5;
|
||||
import std.digest.md;
|
||||
|
||||
alias ubyte[16] HASH;
|
||||
|
||||
HASH hash(Reduction reduction)
|
||||
{
|
||||
ubyte[16] digest;
|
||||
MD5_CTX context;
|
||||
MD5 context;
|
||||
context.start();
|
||||
auto writer = cast(void delegate(string))&context.update;
|
||||
auto writer = cast(void delegate(string))&context.put;
|
||||
dump(root, reduction, writer, writer);
|
||||
context.finish(digest);
|
||||
return digest;
|
||||
return context.finish();
|
||||
}
|
||||
|
||||
alias digestToString formatHash;
|
||||
alias toHexString formatHash;
|
||||
}
|
||||
|
||||
bool[HASH] cache;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue