use of com.perl5.lang.perl.lexer.PerlLexer in project Perl5-IDEA by Camelcade.
the class PerlLexerPerformanceTest method testLexing.
private long testLexing(String testData) {
PerlMergingLexerAdapter perlLexer = new PerlMergingLexerAdapter(getProject(), false, true);
perlLexer.start(testData, 0, testData.length(), 0);
long start = System.currentTimeMillis();
int tokens = 0;
while (perlLexer.getTokenType() != null) {
perlLexer.advance();
tokens++;
}
return System.currentTimeMillis() - start;
}
Aggregations