Only flush token if there is one leftover

expression_parsing.sync-conflict-20210316-090018-O3W7KWN
Tristan B. V. Kildaire 2021-03-02 22:31:53 +02:00
parent cce91b6615
commit b178528ece
1 changed files with 5 additions and 3 deletions

View File

@ -83,9 +83,11 @@ public final class Lexer
}
}
/* When we end we don't flush the last token, flush it now */
currentTokens ~= currentToken;
/* If there was a token made at the end then flush it */
if(currentToken.length)
{
currentTokens ~= currentToken;
}
tokens = currentTokens;
}