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.
|
// Here be dragons.
|
||||||
|
|
||||||
enum MAX_SPLITTER_LEVELS = 5;
|
enum MAX_SPLITTER_LEVELS = 6;
|
||||||
struct DSplitter { char open, close, sep; }
|
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;
|
Entity[][MAX_SPLITTER_LEVELS] splitterQueue;
|
||||||
|
|
||||||
|
|
|
@ -855,22 +855,21 @@ version(HAVE_AE)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
import std.md5;
|
import std.digest.md;
|
||||||
|
|
||||||
alias ubyte[16] HASH;
|
alias ubyte[16] HASH;
|
||||||
|
|
||||||
HASH hash(Reduction reduction)
|
HASH hash(Reduction reduction)
|
||||||
{
|
{
|
||||||
ubyte[16] digest;
|
ubyte[16] digest;
|
||||||
MD5_CTX context;
|
MD5 context;
|
||||||
context.start();
|
context.start();
|
||||||
auto writer = cast(void delegate(string))&context.update;
|
auto writer = cast(void delegate(string))&context.put;
|
||||||
dump(root, reduction, writer, writer);
|
dump(root, reduction, writer, writer);
|
||||||
context.finish(digest);
|
return context.finish();
|
||||||
return digest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
alias digestToString formatHash;
|
alias toHexString formatHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool[HASH] cache;
|
bool[HASH] cache;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue