'code review' comment
This commit is contained in:
parent
79f59bb6f4
commit
b58fa5b855
10
tokenizer.d
10
tokenizer.d
|
@ -163,12 +163,12 @@ string lexDelimitedString(S)(ref S inputString, ref size_t endIndex,
|
|||
string open = inputString[endIndex .. endIndex + 1];
|
||||
string close;
|
||||
bool nesting = false;
|
||||
switch (open)
|
||||
switch (open[0])
|
||||
{
|
||||
case "[": close = "]"; ++endIndex; nesting = true; break;
|
||||
case "<": close = ">"; ++endIndex; nesting = true; break;
|
||||
case "{": close = "}"; ++endIndex; nesting = true; break;
|
||||
case "(": close = ")"; ++endIndex; nesting = true; break;
|
||||
case '[': close = "]"; ++endIndex; nesting = true; break;
|
||||
case '<': close = ">"; ++endIndex; nesting = true; break;
|
||||
case '{': close = "}"; ++endIndex; nesting = true; break;
|
||||
case '(': close = ")"; ++endIndex; nesting = true; break;
|
||||
default:
|
||||
while(!isWhite(inputString[endIndex])) endIndex++;
|
||||
close = open = inputString[startIndex + 1 .. endIndex];
|
||||
|
|
Loading…
Reference in New Issue