public void returnSeen() {
    Environment currentEnvironment = Current.getScope();
    if (currentEnvironment instanceof MethodEnvironment) {
      MethodEnvironment currentMethodEnvironment = (MethodEnvironment) currentEnvironment;
      currentMethodEnvironment.SetReturnSeen(true);
    }

    checkReturnType(currentEnvironment);
  }
  public void isInsideOfLoopScope() {
    Environment currentEnvironment = Current.getScope();
    while (currentEnvironment != null) {
      if (currentEnvironment instanceof LoopEnvironment) return;
      currentEnvironment = currentEnvironment.getParentScope();
    }

    throw new BreakOrContinueMustBeInsideOfLoopScopeException();
  }
 public void resetCurrentContainerEnvironment() {
   _currentContainerEnvironment = Current.getScope();
 }
 public TypeChecker() {
   _typeCheckingStack = new Stack<ModuleEnvironment>();
   _tokenizer = new Tokenizer();
   _currentContainerEnvironment = Current.getScope();
 }
 public void endLoopScope() {
   Current.stepOutToPrevScope();
 }
 public void beginLoopScope() {
   LoopEnvironment loopEnvironment = new LoopEnvironment();
   Current.stepIntoScope(loopEnvironment);
 }
 public void returnToCurrentScope() {
   _currentContainerEnvironment = Current.getScope();
 }