forked from phoedos/pmd
Merge branch 'master' into issue-4349-cleanup-deprecations
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
package net.sourceforge.pmd.lang.kotlin;
|
||||
|
||||
import net.sourceforge.pmd.annotation.Experimental;
|
||||
import net.sourceforge.pmd.cpd.Tokenizer;
|
||||
import net.sourceforge.pmd.cpd.CpdLexer;
|
||||
import net.sourceforge.pmd.lang.LanguagePropertyBundle;
|
||||
import net.sourceforge.pmd.lang.LanguageRegistry;
|
||||
import net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase;
|
||||
import net.sourceforge.pmd.lang.kotlin.cpd.KotlinTokenizer;
|
||||
import net.sourceforge.pmd.lang.kotlin.cpd.KotlinCpdLexer;
|
||||
|
||||
/**
|
||||
* Language Module for Kotlin
|
||||
@@ -35,7 +35,7 @@ public class KotlinLanguageModule extends SimpleLanguageModuleBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Tokenizer createCpdTokenizer(LanguagePropertyBundle bundle) {
|
||||
return new KotlinTokenizer();
|
||||
public CpdLexer createCpdLexer(LanguagePropertyBundle bundle) {
|
||||
return new KotlinCpdLexer();
|
||||
}
|
||||
}
|
||||
|
@@ -7,16 +7,18 @@ package net.sourceforge.pmd.lang.kotlin.cpd;
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.Lexer;
|
||||
|
||||
import net.sourceforge.pmd.cpd.impl.AntlrCpdLexer;
|
||||
import net.sourceforge.pmd.cpd.impl.AntlrTokenFilter;
|
||||
import net.sourceforge.pmd.cpd.impl.AntlrTokenizer;
|
||||
import net.sourceforge.pmd.lang.TokenManager;
|
||||
import net.sourceforge.pmd.lang.ast.impl.antlr4.AntlrToken;
|
||||
import net.sourceforge.pmd.lang.kotlin.ast.KotlinLexer;
|
||||
|
||||
/**
|
||||
* The Kotlin Tokenizer
|
||||
*
|
||||
* <p>Note: This class has been called KotlinTokenizer in PMD 6</p>.
|
||||
*/
|
||||
public class KotlinTokenizer extends AntlrTokenizer {
|
||||
public class KotlinCpdLexer extends AntlrCpdLexer {
|
||||
|
||||
@Override
|
||||
protected Lexer getLexerForSource(CharStream charStream) {
|
@@ -8,9 +8,9 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import net.sourceforge.pmd.cpd.test.CpdTextComparisonTest;
|
||||
|
||||
class KotlinTokenizerTest extends CpdTextComparisonTest {
|
||||
class KotlinCpdLexerTest extends CpdTextComparisonTest {
|
||||
|
||||
KotlinTokenizerTest() {
|
||||
KotlinCpdLexerTest() {
|
||||
super("kotlin", ".kt");
|
||||
}
|
||||
|
Reference in New Issue
Block a user