Search in sources :

Example 1 with UnknownTypeCollector

use of org.eclipse.ceylon.compiler.java.loader.UnknownTypeCollector in project ceylon by eclipse.

the class CeyloncCompilerDelegate method typeCheck.

@Override
public void typeCheck(java.util.List<PhasedUnit> listOfUnits) {
    StatusPrinter sp = getStatusPrinter();
    int size = listOfUnits.size();
    int i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 1, i++, size, pu);
        pu.validateTree();
        pu.scanDeclarations();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 2, i++, size, pu);
        pu.scanTypeDeclarations();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 3, i++, size, pu);
        pu.validateRefinement();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 4, i++, size, pu);
        pu.analyseTypes();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 5, i++, size, pu);
        pu.analyseFlow();
    }
    i = 1;
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 6, i++, size, pu);
        pu.analyseUsage();
    }
    i = 1;
    UnknownTypeCollector utc = new UnknownTypeCollector();
    for (PhasedUnit pu : listOfUnits) {
        if (sp != null)
            progress(sp, 7, i++, size, pu);
        pu.getCompilationUnit().visit(utc);
    }
}
Also used : StatusPrinter(org.eclipse.ceylon.common.StatusPrinter) PhasedUnit(org.eclipse.ceylon.compiler.typechecker.context.PhasedUnit) UnknownTypeCollector(org.eclipse.ceylon.compiler.java.loader.UnknownTypeCollector)

Aggregations

StatusPrinter (org.eclipse.ceylon.common.StatusPrinter)1 UnknownTypeCollector (org.eclipse.ceylon.compiler.java.loader.UnknownTypeCollector)1 PhasedUnit (org.eclipse.ceylon.compiler.typechecker.context.PhasedUnit)1