Update lexer.cpp

simplified wordunitinfo function