function getBreakContext(state, label) {
  let context = state.breakContext;

  while (context) {
    if (label ? context.label === label : context.breakable) {
      return context;
    }
    context = context.upper;
  }

  /* c8 ignore next */
  return null;
}
Gets a context for a `break` statement.
@param {CodePathState} state A state to get.
@param {string} label The label of a `break` statement.
@returns {LoopContext|SwitchContext} A context for a `break` statement.