Extract changes from #2166 to 7.0.x
* Make Java nodes text-available * Introduce shared JavaccToken in pmd-core * Use factory to produce char streams Tests are still on java-grammar, since they use the DSL & newer AST structure. This is to prepare for other changes that concern all javacc languages and should not be done on java-grammar
This commit is contained in:
@ -7,7 +7,7 @@ package net.sourceforge.pmd.lang.python;
|
||||
import java.io.Reader;
|
||||
|
||||
import net.sourceforge.pmd.lang.TokenManager;
|
||||
import net.sourceforge.pmd.lang.ast.SimpleCharStream;
|
||||
import net.sourceforge.pmd.lang.ast.impl.javacc.CharStreamFactory;
|
||||
import net.sourceforge.pmd.lang.python.ast.PythonParserTokenManager;
|
||||
|
||||
/**
|
||||
@ -23,7 +23,7 @@ public class PythonTokenManager implements TokenManager {
|
||||
* the source code
|
||||
*/
|
||||
public PythonTokenManager(Reader source) {
|
||||
tokenManager = new PythonParserTokenManager(new SimpleCharStream(source));
|
||||
tokenManager = new PythonParserTokenManager(CharStreamFactory.simpleCharStream(source));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user