src/com/google/javascript/jscomp/NodeUtil.java
/**
   * A block scope is created by a non-synthetic block node, a for loop node, or a for-of loop node.
   *
   * <p>Note: for functions, we use two separate scopes for parameters and declarations in the body.
   * We need to make sure default parameters cannot reference var / function declarations in the
   * body.
   *
   * @return Whether the node creates a block scope.
   */
A block scope is created by a non-synthetic block node, a for loop node, or a for-of loop node.
Note: for functions, we use two separate scopes for parameters and declarations in the body.
We need to make sure default parameters cannot reference var / function declarations in the
body.

@return Whether the node creates a block scope.
A block scope is created by a non - synthetic block node a for loop node or a for - of loop node . Note : for functions we use two separate scopes for parameters and declarations in the body . We need to make sure default parameters cannot reference var / function declarations in the body . @return Whether the node creates a block scope .
static boolean createsBlockScope(Node n) {
    switch (n.getToken()) {
      case BLOCK:
        Node parent = n.getParent();
        return parent != null && !isSwitchCase(parent) && !parent.isCatch();
      case FOR:
      case FOR_IN:
      case FOR_OF:
      case FOR_AWAIT_OF:
      case SWITCH:
      case CLASS:
        return true;
      default:
        return false;
    }
  }
static boolean createsBlockScope ( Node n ) { switch ( n . getToken ( ) ) { case BLOCK : Node parent = n . getParent ( ) ; return parent != null && ! isSwitchCase ( parent ) && ! parent . isCatch ( ) ; case FOR : case FOR_IN : case FOR_OF : case FOR_AWAIT_OF : case SWITCH : case CLASS : return true ; default : return false ; } }
A block scope is created by a non-synthetic block node, a for loop node, or a for-of loop node.
A block scope is created by a non - synthetic block node a for loop node or a for - of loop node .
// Don't create block scope for switch cases or catch blocks.