private static JavaAstScanner create( JavaConfiguration conf, @Nullable VisitorsBridge visitorsBridge) { JavaAstScanner astScanner = new JavaAstScanner(JavaParser.createParser(conf.getCharset())); if (visitorsBridge != null) { visitorsBridge.setCharset(conf.getCharset()); visitorsBridge.setJavaVersion(conf.javaVersion()); astScanner.setVisitorBridge(visitorsBridge); } return astScanner; }
public static Parser<JavaGrammar> create( JavaConfiguration conf, ParsingEventListener... parsingEventListeners) { return new ParserAdapter<JavaGrammar>(conf.getCharset(), new JavaGrammarImpl()); }