Simplify, don't special-case comments.
Not much is gained by using `tokenLength` anyway, use the slice length for everything. `len` is now unsigned so the assert is obsolete.
This commit is contained in:
parent
f3fe504ed5
commit
5c28af1ac7
|
@ -533,8 +533,7 @@ private:
|
||||||
{
|
{
|
||||||
if (tokens[i].type == tok!"," || tokens[i].type == tok!";")
|
if (tokens[i].type == tok!"," || tokens[i].type == tok!";")
|
||||||
break;
|
break;
|
||||||
immutable len = tokens[i].type == tok!"comment" ? tokens[i].text.length : tokenLength(tokens[i]);
|
immutable len = tokens[i].text.length;
|
||||||
assert(len >= 0);
|
|
||||||
lengthOfNextChunk += len;
|
lengthOfNextChunk += len;
|
||||||
}
|
}
|
||||||
assert(lengthOfNextChunk > 0);
|
assert(lengthOfNextChunk > 0);
|
||||||
|
|
Loading…
Reference in New Issue