Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -464,6 +464,8 @@ namespace Microsoft.Build.BuildEngine {
List<string> args = new List<string> ();
int parens = 0;
bool backticks = false;
bool inDoubleQuotes = false;
bool inSingleQuotes = false;
int start = pos;
for (; pos < text.Length; ++pos) {
var ch = text [pos];
@@ -476,6 +478,16 @@ namespace Microsoft.Build.BuildEngine {
if (backticks)
continue;
if(ch == '\'' && !inDoubleQuotes) {
inSingleQuotes = !inSingleQuotes;
continue;
}
if (ch == '\"' && !inSingleQuotes) {
inDoubleQuotes = !inDoubleQuotes;
continue;
}
if (ch == '(') {
++parens;
continue;
@@ -498,7 +510,7 @@ namespace Microsoft.Build.BuildEngine {
if (parens != 0)
continue;
if (ch == ',') {
if (ch == ',' && !inDoubleQuotes && !inSingleQuotes) {
args.Add (text.Substring (start, pos - start));
start = pos + 1;
continue;