diff --git a/scanner/lexer.go b/scanner/lexer.go index dd6c05a..706e371 100644 --- a/scanner/lexer.go +++ b/scanner/lexer.go @@ -54,8 +54,10 @@ func Rune2Class(r rune) int { if unicode.IsGraphic(r) { return classUnicodeGraphic } - // return classOther - return -1 + if r == lex.RuneEOF { + return int(r) + } + return classOther } // NewLexer the Lexer constructor