Lexer unit test now prints out resulting error

This commit is contained in:
2022-08-10 13:03:48 -04:00
parent cf04dfd600
commit 9f8b48161a
2 changed files with 3 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ type LexingOperation struct {
// Tokenize converts a file into a slice of tokens (lexemes).
func Tokenize (file *file.File) (tokens []Token, err error) {
lexer := LexingOperation { file: file }
err = lexer.tokenize()
err = lexer.tokenize()
tokens = lexer.tokens
// if the lexing operation returned io.EOF, nothing went wrong so we