Skip to content

Commit

Permalink
Revert "Merge remote-tracking branch 'quahu/dev' into dev"
Browse files Browse the repository at this point in the history
This reverts commit 8fb0d5d, reversing
changes made to 3e65e03.
  • Loading branch information
foxbot committed Jun 5, 2019
1 parent 8fb0d5d commit a8c853f
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions src/Discord.Net.Commands/CommandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ char GetMatch(IReadOnlyDictionary<char, char> dict, char ch)
else
c = '\0';

//If we're processing a remainder parameter, ignore all other logic
if (curParam != null && curParam.IsRemainder && curPos != endPos)
{
argBuilder.Append(c);
continue;
}

//If this character is escaped, skip it
if (isEscaping)
{
Expand All @@ -86,6 +79,13 @@ char GetMatch(IReadOnlyDictionary<char, char> dict, char ch)
continue;
}

//If we're processing an remainder parameter, ignore all other logic
if (curParam != null && curParam.IsRemainder && curPos != endPos)
{
argBuilder.Append(c);
continue;
}

//If we're not currently processing one, are we starting the next argument yet?
if (curPart == ParserPart.None)
{
Expand Down Expand Up @@ -114,23 +114,6 @@ char GetMatch(IReadOnlyDictionary<char, char> dict, char ch)
}
}

//If this character is escaped, skip it
if (isEscaping)
{
if (curPos != endPos)
{
argBuilder.Append(c);
isEscaping = false;
continue;
}
}
//Are we escaping the next character?
if (c == '\\' && (curParam == null || !curParam.IsRemainder))
{
isEscaping = true;
continue;
}

//Has this parameter ended yet?
string argString = null;
if (curPart == ParserPart.Parameter)
Expand Down

0 comments on commit a8c853f

Please sign in to comment.