#409 - Fix for error(s) in build accessing std.ascii.isAlphaNum

This commit is contained in:
Roger Knapp 2019-06-27 20:25:57 -05:00
parent 16abdd171b
commit 43a82ed2f4
1 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,7 @@ import std.file;
import std.path; import std.path;
import std.process; import std.process;
import std.utf; import std.utf;
import std.ascii;
string[] includePath; string[] includePath;
@ -934,19 +935,19 @@ class DubPackageFinder {
bool isValidProjectName(in string s) pure { bool isValidProjectName(in string s) pure {
if (s.empty) if (s.empty)
return false; return false;
return reduce!q{ a && (b == '_' || b == '-' || std.ascii.isAlphaNum(b)) }(true, s); return reduce!((a,b) => a && (b == '_' || b == '-' || std.ascii.isAlphaNum(b)))(true, s);
} }
bool isValidModuleName(in string s) pure { bool isValidModuleName(in string s) pure {
if (s.empty) if (s.empty)
return false; return false;
return reduce!q{ a && (b == '_' || std.ascii.isAlphaNum(b)) }(true, s); return reduce!((a,b) => a && (b == '_' || std.ascii.isAlphaNum(b)))(true, s);
} }
bool isValidFileName(in string s) pure { bool isValidFileName(in string s) pure {
if (s.empty) if (s.empty)
return false; return false;
return reduce!q{ a && (b == '_' || b == '.' || b == '-' || std.ascii.isAlphaNum(b)) }(true, s); return reduce!((a,b) => a && (b == '_' || b == '.' || b == '-' || std.ascii.isAlphaNum(b)))(true, s);
} }
unittest { unittest {