Package org.jetbrains.plugins.clojure.lexer

Examples of org.jetbrains.plugins.clojure.lexer.ClojureFlexLexer.advance()


  public boolean isInputValid(String newName, PsiElement element, ProcessingContext context) {
    final ClojureFlexLexer lexer = new ClojureFlexLexer();
    lexer.start(newName, 0, newName.length(), 0);
    if (lexer.getTokenType() != ClojureTokenTypes.symATOM) return false;
    lexer.advance();
    return lexer.getTokenType() == null;
  }
}
View Full Code Here


    ApplicationManager.getApplication().assertReadAccessAllowed();
    if (text == null) return false;
    Lexer lexer = new ClojureFlexLexer();
    lexer.start(text, 0, text.length(), 0);
    if (lexer.getTokenType() != ClojureTokenTypes.symATOM) return false;
    lexer.advance();
    return lexer.getTokenType() == null;
  }

}
View Full Code Here

  public boolean isKeyword(String name, Project project) {
    final ClojureFlexLexer lexer = new ClojureFlexLexer();
    lexer.start(name, 0, name.length(), 0);
    if (!ClojureTokenTypes.KEYWORDS.contains(lexer.getTokenType())) return false;
    lexer.advance();
    return lexer.getTokenType() == null;
  }

  public boolean isIdentifier(String name, Project project) {
    final ClojureFlexLexer lexer = new ClojureFlexLexer();
View Full Code Here

  public boolean isIdentifier(String name, Project project) {
    final ClojureFlexLexer lexer = new ClojureFlexLexer();
    lexer.start(name, 0, name.length(), 0);
    if (!ClojureTokenTypes.IDENTIFIERS.contains(lexer.getTokenType())) return false;
    lexer.advance();
    return lexer.getTokenType() == null;
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.