transformYieldExpression_(tree) {
    let expression, machine;
    if (this.expressionNeedsStateMachine(tree.expression)) {
      ({expression, machine} = this.expressionToStateMachine(tree.expression));
    } else {
      expression = this.transformAny(tree.expression);
    }

    if (tree.isYieldFor)
      return this.transformYieldForExpression_(expression, machine);

    let startState = this.allocateState();
    let fallThroughState = this.allocateState();
    let yieldMachine = this.stateToStateMachine_(
        new YieldState(startState, fallThroughState, expression),
        fallThroughState);

    if (machine)
      yieldMachine = machine.append(yieldMachine);

    // The yield expression we generated for the yield-for expression should not
    // be followed by the ThrowCloseState since the inner iterator need to
    // handle the throw case.
    if (this.shouldAppendThrowCloseState_)
      yieldMachine = yieldMachine.append(this.createThrowCloseState_());

    return yieldMachine;
  }
Simple form yield expressions (direct children of an ExpressionStatement)
are translated into a state machine with a single state.
@param {YieldExpression} tree
@return {ParseTree}
@private