components/blockly-src/blocks/lists.js
function(newStatement) {
    var oldStatement = !this.outputConnection;
    if (newStatement != oldStatement) {
      this.unplug(true, true);
      if (newStatement) {
        this.setOutput(false);
        this.setPreviousStatement(true);
        this.setNextStatement(true);
      } else {
        this.setPreviousStatement(false);
        this.setNextStatement(false);
        this.setOutput(true);
      }
    }
  }
function(newStatement) {
    var oldStatement = !this.outputConnection;
    if (newStatement != oldStatement) {
      this.unplug(true, true);
      if (newStatement) {
        this.setOutput(false);
        this.setPreviousStatement(true);
        this.setNextStatement(true);
      } else {
        this.setPreviousStatement(false);
        this.setNextStatement(false);
        this.setOutput(true);
      }
    }
  }
function ( newStatement ) { var oldStatement = ! this . outputConnection ; if ( newStatement != oldStatement ) { this . unplug ( true , true ) ; if ( newStatement ) { this . setOutput ( false ) ; this . setPreviousStatement ( true ) ; this . setNextStatement ( true ) ; } else { this . setPreviousStatement ( false ) ; this . setNextStatement ( false ) ; this . setOutput ( true ) ; } } }
Switch between a value block and a statement block.
@param {boolean} newStatement True if the block should be a statement.
False if the block should be a value.
@private
@this Blockly.Block
Switch between a value block and a statement block .