public WordsScanner getWordsScanner() {
return new WordsScanner() {
@Override
public void processWords(CharSequence fileText, Processor<WordOccurrence> processor) {
ErlangLexer lexer = new ErlangLexer();
lexer.start(fileText);
IElementType tokenType;
while ((tokenType = lexer.getTokenType()) != null) {
//TODO process occurrences in string literals and comments
if (tokenType == ErlangTypes.ERL_ATOM_NAME || tokenType == ErlangTypes.ERL_VAR) {
int tokenStart = lexer.getTokenStart();