pushLoopContext(type, label) {
    const forkContext = this.forkContext;
    const breakContext = this.pushBreakContext(true, label);

    switch (type) {
      case 'WhileStatement':
        this.pushChoiceContext('loop', false);
        this.loopContext = {
          upper: this.loopContext,
          type,
          label,
          test: void 0,
          continueDestSegments: null,
          brokenForkContext: breakContext.brokenForkContext,
        };
        break;

      case 'DoWhileStatement':
        this.pushChoiceContext('loop', false);
        this.loopContext = {
          upper: this.loopContext,
          type,
          label,
          test: void 0,
          entrySegments: null,
          continueForkContext: ForkContext.newEmpty(forkContext),
          brokenForkContext: breakContext.brokenForkContext,
        };
        break;

      case 'ForStatement':
        this.pushChoiceContext('loop', false);
        this.loopContext = {
          upper: this.loopContext,
          type,
          label,
          test: void 0,
          endOfInitSegments: null,
          testSegments: null,
          endOfTestSegments: null,
          updateSegments: null,
          endOfUpdateSegments: null,
          continueDestSegments: null,
          brokenForkContext: breakContext.brokenForkContext,
        };
        break;

      case 'ForInStatement':
      case 'ForOfStatement':
        this.loopContext = {
          upper: this.loopContext,
          type,
          label,
          prevSegments: null,
          leftSegments: null,
          endOfLeftSegments: null,
          continueDestSegments: null,
          brokenForkContext: breakContext.brokenForkContext,
        };
        break;

      /* c8 ignore next */
      default:
        throw new Error(`unknown type: "${type}"`);
    }
  }
Creates a context object of a loop statement and stacks it.
@param {string} type The type of the node which was triggered. One of
  `WhileStatement`, `DoWhileStatement`, `ForStatement`, `ForInStatement`,
  and `ForStatement`.
@param {string|null} label A label of the node which was triggered.
@throws {Error} (Unreachable - unknown type.)
@returns {void}