Package com.redhat.ceylon.compiler.typechecker.model

Examples of com.redhat.ceylon.compiler.typechecker.model.ControlBlock


   
    private int id=0;
   
    @Override
    public void visit(Tree.ControlClause that) {
        ControlBlock cb = new ControlBlock();
        cb.setId(id++);
        that.setControlBlock(cb);
        visitElement(that, cb);
        Scope o = enterScope(cb);
        super.visit(that);
        exitScope(o);
View Full Code Here


     * Removes the "inner substitutions" for any deferred values specified
     * in the given control block
     */
    private void closeInnerSubstituionsForSpecifiedValues(Tree.ControlClause contolClause) {
        if (contolClause != null) {
            ControlBlock controlBlock = contolClause.getControlBlock();
            java.util.Set<Value> assigned = controlBlock.getSpecifiedValues();
            if (assigned != null) {
                for (Value value : assigned) {
                    DeferredSpecification ds = statementGen().getDeferredSpecification(value);
                    if (ds != null) {
                        ds.closeInnerSubstitution();
View Full Code Here

    private ControlBlock elseBlock = null;
   
    private HashMap<Value, ControlBlock> tracked = new HashMap<Value, ControlBlock>();
   
    public void visit(Tree.AnyMethod that) {
        ControlBlock prevControlBlock = forBlock;
        forBlock = null;
        super.visit(that);
        forBlock = prevControlBlock;
    }
View Full Code Here

        super.visit(that);
        forBlock = prevControlBlock;
    }
   
    public void visit(Tree.AnyAttribute that) {
        ControlBlock prevControlBlock = forBlock;
        forBlock = null;
        super.visit(that);
        forBlock = prevControlBlock;
    }
View Full Code Here

        super.visit(that);
        forBlock = prevControlBlock;
    }
   
    public void visit(Tree.AnyClass that) {
        ControlBlock prevControlBlock = forBlock;
        forBlock = null;
        super.visit(that);
        forBlock = prevControlBlock;
    }
View Full Code Here

                    && forBlock != null // specification is in a for/else
                    && !forBlock.equals(tracked.get(decl))) { // not declared in *this* for/else
                if (elseBlock == null) {
                    ((Value)decl).setSpecifiedInForElse(true);
                }
                ControlBlock assigningBlock = elseBlock != null ? elseBlock : forBlock;
                Set<Value> assigned = assigningBlock.getSpecifiedValues();
                if (assigned == null) {
                    assigned = new HashSet<Value>(1);
                    assigningBlock.setSpecifiedValues(assigned);
                }
                assigned.add((Value)decl);
            }
        }
        super.visit(stmt);
View Full Code Here

        }
        super.visit(stmt);
    }
   
    public void visit(Tree.ForStatement that) {
        ControlBlock prevControlBlock = forBlock;
       
        forBlock = that.getForClause().getControlBlock();
        that.getForClause().visit(this);
       
        if (that.getElseClause() != null) {
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.typechecker.model.ControlBlock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.