Search in sources :

Example 1 with ModuleImportList

use of org.eclipse.ceylon.model.typechecker.model.ModuleImportList in project ceylon by eclipse.

the class DeclarationVisitor method visit.

@Override
public void visit(Tree.ImportModuleList that) {
    ModuleImportList il = new ModuleImportList();
    il.setContainer(scope);
    il.setUnit(unit);
    Scope o = enterScope(il);
    super.visit(that);
    exitScope(o);
}
Also used : ModuleImportList(org.eclipse.ceylon.model.typechecker.model.ModuleImportList) Scope(org.eclipse.ceylon.model.typechecker.model.Scope) ConditionScope(org.eclipse.ceylon.model.typechecker.model.ConditionScope) ModelUtil.getRealScope(org.eclipse.ceylon.model.typechecker.model.ModelUtil.getRealScope)

Example 2 with ModuleImportList

use of org.eclipse.ceylon.model.typechecker.model.ModuleImportList in project ceylon by eclipse.

the class Decl method getToplevelDeclarationContainer.

public static Declaration getToplevelDeclarationContainer(Declaration decl) {
    while (decl != null) {
        Scope container = decl.getContainer();
        if (container instanceof Package || container instanceof ModuleImportList) {
            return decl;
        }
        decl = getDeclarationScope(container);
    }
    return decl;
}
Also used : ModuleImportList(org.eclipse.ceylon.model.typechecker.model.ModuleImportList) Scope(org.eclipse.ceylon.model.typechecker.model.Scope) ConditionScope(org.eclipse.ceylon.model.typechecker.model.ConditionScope) Package(org.eclipse.ceylon.model.typechecker.model.Package)

Aggregations

ConditionScope (org.eclipse.ceylon.model.typechecker.model.ConditionScope)2 ModuleImportList (org.eclipse.ceylon.model.typechecker.model.ModuleImportList)2 Scope (org.eclipse.ceylon.model.typechecker.model.Scope)2 ModelUtil.getRealScope (org.eclipse.ceylon.model.typechecker.model.ModelUtil.getRealScope)1 Package (org.eclipse.ceylon.model.typechecker.model.Package)1