private Map<String, GroovyClassDoc> parseGroovy(String packagePath, String file, String src) throws RecognitionException, TokenStreamException { SourceBuffer sourceBuffer = new SourceBuffer(); GroovyRecognizer parser = getGroovyParser(src, sourceBuffer); try { parser.compilationUnit(); } catch (OutOfMemoryError e) { log.error("Out of memory while processing: " + packagePath + "/" + file); throw e; } AST ast = parser.getAST(); // now do the business Visitor visitor = new SimpleGroovyClassDocAssembler(packagePath, file, sourceBuffer, links, properties, true); AntlrASTProcessor traverser = new SourceCodeTraversal(visitor); traverser.process(ast); return ((SimpleGroovyClassDocAssembler) visitor).getGroovyClassDocs(); }
private Map<String, GroovyClassDoc> parseGroovy(String packagePath, String file, String src) throws RecognitionException, TokenStreamException { SourceBuffer sourceBuffer = new SourceBuffer(); GroovyRecognizer parser = getGroovyParser(src, sourceBuffer); try { parser.compilationUnit(); } catch (OutOfMemoryError e) { System.out.println("Out of memory while processing: " + packagePath + "/" + file); throw e; } AST ast = parser.getAST(); // now do the business Visitor visitor = new SimpleGroovyClassDocAssembler(packagePath, file, sourceBuffer, links, properties, true); AntlrASTProcessor traverser = new SourceCodeTraversal(visitor); traverser.process(ast); return ((SimpleGroovyClassDocAssembler) visitor).getGroovyClassDocs(); }
private Map<String, GroovyClassDoc> parseGroovy(String packagePath, String file, String src) throws RecognitionException, TokenStreamException { SourceBuffer sourceBuffer = new SourceBuffer(); GroovyRecognizer parser = getGroovyParser(src, sourceBuffer); try { parser.compilationUnit(); } catch (OutOfMemoryError e) { System.out.println("Out of memory while processing: " + packagePath + "/" + file); throw e; } AST ast = parser.getAST(); // now do the business Visitor visitor = new SimpleGroovyClassDocAssembler(packagePath, file, sourceBuffer, links, properties, true); AntlrASTProcessor traverser = new SourceCodeTraversal(visitor); traverser.process(ast); return ((SimpleGroovyClassDocAssembler) visitor).getGroovyClassDocs(); }
private Map parseGroovy(String packagePath, String file, String src) throws RecognitionException, TokenStreamException { SourceBuffer sourceBuffer = new SourceBuffer(); GroovyRecognizer parser = getGroovyParser(src, sourceBuffer); String[] tokenNames = parser.getTokenNames(); parser.compilationUnit(); AST ast = parser.getAST(); // now do the business Visitor visitor = new SimpleGroovyClassDocAssembler(packagePath, file, sourceBuffer, links); AntlrASTProcessor traverser = new SourceCodeTraversal(visitor); traverser.process(ast); return ((SimpleGroovyClassDocAssembler) visitor).getGroovyClassDocs(); }
private Map<String, GroovyClassDoc> parseGroovy(String packagePath, String file, String src) throws RecognitionException, TokenStreamException { SourceBuffer sourceBuffer = new SourceBuffer(); GroovyRecognizer parser = getGroovyParser(src, sourceBuffer); try { parser.compilationUnit(); } catch (OutOfMemoryError e) { log.error("Out of memory while processing: " + packagePath + "/" + file); throw e; } AST ast = parser.getAST(); // now do the business Visitor visitor = new SimpleGroovyClassDocAssembler(packagePath, file, sourceBuffer, links, properties, true); AntlrASTProcessor traverser = new SourceCodeTraversal(visitor); traverser.process(ast); return ((SimpleGroovyClassDocAssembler) visitor).getGroovyClassDocs(); }
private Map<String, GroovyClassDoc> parseGroovy(String packagePath, String file, String src) throws RecognitionException, TokenStreamException { SourceBuffer sourceBuffer = new SourceBuffer(); GroovyRecognizer parser = getGroovyParser(src, sourceBuffer); try { parser.compilationUnit(); } catch (OutOfMemoryError e) { log.error("Out of memory while processing: " + packagePath + "/" + file); throw e; } AST ast = parser.getAST(); // now do the business Visitor visitor = new SimpleGroovyClassDocAssembler(packagePath, file, sourceBuffer, links, properties, true); AntlrASTProcessor traverser = new SourceCodeTraversal(visitor); traverser.process(ast); return ((SimpleGroovyClassDocAssembler) visitor).getGroovyClassDocs(); }