コード例 #1
0
ファイル: Analyzer.java プロジェクト: unixc3t/rubysonar
    @Nullable
    private Type parseAndResolve(String file) {
        try {
            Node ast = getAstForFile(file);

            if (ast == null) {
                failedToParse.add(file);
                return null;
            } else {
                Type type = Node.transformExpr(ast, globaltable);
                if (!loadedFiles.contains(file)) {
                    loadedFiles.add(file);
                    loadingProgress.tick();
                }
                return type;
            }
        } catch (OutOfMemoryError e) {
            if (astCache != null) {
                astCache.clear();
            }
            System.gc();
            return null;
        }
    }
コード例 #2
0
ファイル: Analyzer.java プロジェクト: unixc3t/rubysonar
 public void close() {
     astCache.close();
 }
コード例 #3
0
ファイル: Analyzer.java プロジェクト: unixc3t/rubysonar
 private AstCache getAstCache() {
     if (astCache == null) {
         astCache = AstCache.get();
     }
     return astCache;
 }