From 9d2b6e985b008492fc99a79f1f674cc2ea83be2f Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Mon, 4 Apr 2022 00:56:10 -0400 Subject: Fix tokenizer bug relating to end of files --- src/tparse/tokenize.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tparse/tokenize.go b/src/tparse/tokenize.go index 2d49376..8eab15a 100644 --- a/src/tparse/tokenize.go +++ b/src/tparse/tokenize.go @@ -235,7 +235,7 @@ func TokenizeFile(path string) []Token { if err != nil { if err != io.EOF { out = append(out, Token{Type: -1}) - } else { + } else if b.String() != "" { out = append(out, Token{Type: checkToken(b.String(), pre), Data: b.String(), Line: ln, Char: last}) } break -- cgit v1.2.3