예제 #1
0
 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;
 }
예제 #2
0
 public static Parser<JavaGrammar> create(
     JavaConfiguration conf, ParsingEventListener... parsingEventListeners) {
   return new ParserAdapter<JavaGrammar>(conf.getCharset(), new JavaGrammarImpl());
 }