diff --git a/source/tlang/commandline/lexer.d b/source/tlang/commandline/lexer.d index 5a8f824..ac38b29 100644 --- a/source/tlang/commandline/lexer.d +++ b/source/tlang/commandline/lexer.d @@ -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 ~= ";";