components/blockly-src/blocks/procedures.js
function(hasStatements) {
    if (this.hasStatements_ === hasStatements) {
      return;
    }
    if (hasStatements) {
      this.appendStatementInput('STACK')
          .appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO);
      if (this.getInput('RETURN')) {
        this.moveInputBefore('STACK', 'RETURN');
      }
    } else {
      this.removeInput('STACK', true);
    }
    this.hasStatements_ = hasStatements;
  }
function(hasStatements) {
    if (this.hasStatements_ === hasStatements) {
      return;
    }
    if (hasStatements) {
      this.appendStatementInput('STACK')
          .appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO);
      if (this.getInput('RETURN')) {
        this.moveInputBefore('STACK', 'RETURN');
      }
    } else {
      this.removeInput('STACK', true);
    }
    this.hasStatements_ = hasStatements;
  }
function ( hasStatements ) { if ( this . hasStatements_ === hasStatements ) { return ; } if ( hasStatements ) { this . appendStatementInput ( 'STACK' ) . appendField ( Blockly . Msg . PROCEDURES_DEFNORETURN_DO ) ; if ( this . getInput ( 'RETURN' ) ) { this . moveInputBefore ( 'STACK' , 'RETURN' ) ; } } else { this . removeInput ( 'STACK' , true ) ; } this . hasStatements_ = hasStatements ; }
Add or remove the statement block from this function definition.
@param {boolean} hasStatements True if a statement block is needed.
@this Blockly.Block
Add or remove the statement block from this function definition .