Only flush the currentToken when encountering a semi-colon IF the currentToken is non-empty
parent
b178528ece
commit
ce7ea36b0b
|
@ -40,9 +40,12 @@ public final class Lexer
|
||||||
}
|
}
|
||||||
else if(currentChar == ';' && !stringMode)
|
else if(currentChar == ';' && !stringMode)
|
||||||
{
|
{
|
||||||
/* Flush the current token */
|
/* Flush the current token (if one exists) */
|
||||||
|
if(currentToken.length)
|
||||||
|
{
|
||||||
currentTokens ~= currentToken;
|
currentTokens ~= currentToken;
|
||||||
currentToken = "";
|
currentToken = "";
|
||||||
|
}
|
||||||
|
|
||||||
/* Add the ; token */
|
/* Add the ; token */
|
||||||
currentTokens ~= ";";
|
currentTokens ~= ";";
|
||||||
|
|
Loading…
Reference in New Issue