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