Fixed a bug with parsing null values caused by std.regex changes,

and a minor ZeroString fix.
This commit is contained in:
Ferdinand Majerech 2012-01-23 01:19:49 +01:00
parent 06e3a6db3b
commit 07eadc9403
2 changed files with 2 additions and 4 deletions

View file

@ -242,9 +242,8 @@ final class Resolver
"|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$"), "|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$"),
"-+0123456789"); "-+0123456789");
addImplicitResolver("tag:yaml.org,2002:merge", regex(r"^<<$"), "<"); addImplicitResolver("tag:yaml.org,2002:merge", regex(r"^<<$"), "<");
addImplicitResolver("tag:yaml.org,2002:null", addImplicitResolver("tag:yaml.org,2002:null",
regex(r"^(?:~|null|Null|NULL|\0)?$"), "~nN\0"); regex(r"^$|^(?:~|null|Null|NULL)$"), "~nN\0");
addImplicitResolver("tag:yaml.org,2002:timestamp", addImplicitResolver("tag:yaml.org,2002:timestamp",
regex(r"^[0-9][0-9][0-9][0-9]-[0-9][0-9]-" regex(r"^[0-9][0-9][0-9][0-9]-[0-9][0-9]-"
"[0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9]" "[0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9]"

View file

@ -55,9 +55,8 @@ struct ZeroString(string TypeName)
in{assert(!isNull);} in{assert(!isNull);}
body body
{ {
static type = typeid(string);
auto str = get(); auto str = get();
return type.getHash(&str); return typeid(string).getHash(&str);
} }
///Compare with another string. ///Compare with another string.