Examples of BlockScope


Examples of org.eclipse.jdt.internal.compiler.lookup.BlockScope

    return output;
  }

  public void resolve(BlockScope upperScope) {
    // use the scope that will hold the init declarations
    this.scope = new BlockScope(upperScope);
    this.elementVariable.resolve(this.scope); // collection expression can see itemVariable
    TypeBinding elementType = this.elementVariable.type.resolvedType;
    TypeBinding collectionType = this.collection == null ? null : this.collection.resolveType(upperScope);

    TypeBinding expectedCollectionType = null;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.BlockScope

          // handle the error case inside an explicit constructor call (see MethodScope>>findField)
          MethodScope methodScope = (MethodScope) currentScope;
          staticsOnly |= methodScope.isStatic | methodScope.isConstructorCall;
          //$FALL-THROUGH$
        case Scope.BLOCK_SCOPE :
          BlockScope blockScope = (BlockScope) currentScope;

          next : for (int i = 0, length = blockScope.locals.length; i < length; i++) {
            LocalVariableBinding local = blockScope.locals[i];

            if (local == null)
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.BlockScope

    return output;
  }

  public void resolve(BlockScope upperScope) {
    // use the scope that will hold the init declarations
    this.scope = new BlockScope(upperScope);
    this.elementVariable.resolve(this.scope); // collection expression can see itemVariable
    TypeBinding elementType = this.elementVariable.type.resolvedType;
    TypeBinding collectionType = this.collection == null ? null : this.collection.resolveType(this.scope);

    TypeBinding expectedCollectionType = null;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.BlockScope

        trackingVar = trackingVar.outerTracker;
      } else if (atExit) {
        // at an exit point we report against inner despite a wrapper that may/may not be closed later
        break;
      } else {
        BlockScope outerTrackerScope = trackingVar.outerTracker.binding.declaringScope;
        if (outerTrackerScope == scope) {
          // outerTracker is from same scope and already processed -> pick trackingVar now
          break;
        } else {
          // outer resource is from other (outer?) scope
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.BlockScope

    }
    return false;
  }

  public boolean isClosedInFinallyOfEnclosing(BlockScope scope) {
    BlockScope currentScope = scope;
    while (true) {     
      if (currentScope.finallyInfo != null
          && currentScope.finallyInfo.isDefinitelyNonNull(this.binding)) {
        return true; // closed in enclosing finally
      }
View Full Code Here

Examples of org.tod.meta.sourcecode.BlockScope

public class ProgramStepFactory {

    public static TestConditionalStep conditionalStep(TODSession session, ICallerSideEvent event, int newLine, int lastLineNumber, boolean forward) {
        // Did the conditional evaluate to true or false?
        boolean conditionalTrue;
        BlockScope targetScope;
        if (event == null) {
            return null;
        }
       
        if(event.getOperationBehavior() == null){
            return null;
        }
        // Gather information about i) the class we're in,
        // ii) the last scope we were in (from lastLineNumber) and
        // iii) the current scope we are in.
        ClassInfo classInfo = session.getClassInformationProvider().getClassInfo(event.getOperationBehavior().getDeclaringType());
        SourceInfo sourceInfo = classInfo.getSourceInfo();
        BlockScope lastScope = sourceInfo.findScope(lastLineNumber);
        BlockScope newScope = sourceInfo.findScope(newLine);
       
        if (newScope == null && lastScope == null) {
            return null;
        }
       
        // We want to generate a test conditional step under the following cases:
        // i) We just entered the body of an if/elseif/else;
        // ii) We skipped over the body of an if/elseif.
       
        // If we weren't in a scope on lastLine, then don't worry about it--
        // just skip.
        if (lastScope != null) {
            // If the lastLineNumber was the start of an if/elseif...
            if (lastLineNumber == lastScope.getStartLine()) {
                // ...and we're in the same scope now, then it's true.
                if (newScope != null && newScope.getEndLine() <= lastScope.getEndLine()) {
                    conditionalTrue = true;
                    targetScope = lastScope;
                } else {
                    // We're not in that scope, so it was false.
                    // Is our current scope an else? If so, the "else"
                    // has evaluated to true.
                    if (newScope != null && newScope.getType() == Scope.ELSE) {
                        conditionalTrue = true;
                        targetScope = newScope;
                    } else {
                        conditionalTrue = false;
                        targetScope = lastScope;
View Full Code Here

Examples of org.tod.meta.sourcecode.BlockScope

    }
   
    public static TestLoopStep loopStep(TODSession session, ICallerSideEvent event, int newLine, int lastLineNumber, boolean forward) {
        // Did the loop evaluate to true or false?
        boolean loopTrue = false;
        BlockScope targetScope = null;
        if (event == null) {
            return null;
        }
       
        if(event.getOperationBehavior() == null){
            return null;
        }
        // Gather information about i) the class we're in,
        // ii) the last scope we were in (from lastLineNumber) and
        // iii) the current scope we are in.
        ClassInfo classInfo = session.getClassInformationProvider().getClassInfo(event.getOperationBehavior().getDeclaringType());
        SourceInfo sourceInfo = classInfo.getSourceInfo();
        BlockScope lastScope = sourceInfo.findScope(lastLineNumber);
        BlockScope newScope = sourceInfo.findScope(newLine);
       
        if (newScope == null && lastScope == null) {
            return null;
        }
       
        // We want to generate a test conditional step under the following cases:
        // i) We just entered the body of an if/elseif/else;
        // ii) We skipped over the body of an if/elseif.
       
        // If we weren't in a scope on lastLine, then don't worry about it--
        // just skip.
        if (lastScope != null) {
            // If the lastLineNumber was the start of a repeat...
            if (lastLineNumber == lastScope.getStartLine() && lastScope.getType() == Scope.REPEAT) {
                // ...and we're in the same scope now, then it's true.
                if (newScope != null && newScope.getEndLine() <= lastScope.getEndLine()) {
                    loopTrue = true;
                    targetScope = lastScope;
                } else {
                    // We're not in that scope, so it was false.
                    loopTrue = false;
View Full Code Here

Examples of tree.statement.BlockScope

            {
                // Haxe.g:256:49: ^( BLOCK_SCOPE[$LBRACE, $RBRACE] ( blockStmt )* )
                {
                Object root_1 = (Object)adaptor.nil();
                root_1 = (Object)adaptor.becomeRoot(
                new BlockScope(BLOCK_SCOPE, LBRACE147, RBRACE149)
                , root_1);

                // Haxe.g:256:93: ( blockStmt )*
                while ( stream_blockStmt.hasNext() ) {
                    adaptor.addChild(root_1, stream_blockStmt.nextTree());
View Full Code Here

Examples of tree.statement.BlockScope

            {
                // Haxe.g:380:53: ^( BLOCK_SCOPE[$LBRACE, $RBRACE] ( enumValueDecl )* )
                {
                Object root_1 = (Object)adaptor.nil();
                root_1 = (Object)adaptor.becomeRoot(
                new BlockScope(BLOCK_SCOPE, LBRACE283, RBRACE285)
                , root_1);

                // Haxe.g:380:97: ( enumValueDecl )*
                while ( stream_enumValueDecl.hasNext() ) {
                    adaptor.addChild(root_1, stream_enumValueDecl.nextTree());
View Full Code Here

Examples of tree.statement.BlockScope

            {
                // Haxe.g:392:51: ^( BLOCK_SCOPE[$LBRACE, $RBRACE] ( classMember )* )
                {
                Object root_1 = (Object)adaptor.nil();
                root_1 = (Object)adaptor.becomeRoot(
                new BlockScope(BLOCK_SCOPE, LBRACE302, RBRACE304)
                , root_1);

                // Haxe.g:392:95: ( classMember )*
                while ( stream_classMember.hasNext() ) {
                    adaptor.addChild(root_1, stream_classMember.nextTree());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.