Skip to content

Commit

Permalink
fix(tokenizer): white spaces included even with TWs = false
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr0x committed Sep 21, 2023
1 parent a2440c2 commit b0db24b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Swirl/include/tokenizer/Tokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ class TokenStream {
Token cur_tk = readNextTok();

if (!_showTWs)
if (cur_tk.type == PUNC && cur_tk.value == " ")
while (cur_tk.type == PUNC && cur_tk.value == " ")
cur_tk = readNextTok();
if (!_showTNw)
if (cur_tk.type == PUNC && cur_tk.value == "\n")
while (cur_tk.type == PUNC && cur_tk.value == "\n")
cur_tk = readNextTok();

if (_modifyCurTk) { p_CurTk = cur_tk; }
Expand Down

0 comments on commit b0db24b

Please sign in to comment.