diff --git a/scanner/lexer.go b/scanner/lexer.go index de85922..b5680a7 100644 --- a/scanner/lexer.go +++ b/scanner/lexer.go @@ -462,8 +462,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