Merge pull request #54 from imuli/other-unicode
distinguish unknown unicode characters from EOF
This commit is contained in:
commit
731a0ed1c4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user