Fixes pull request comments

This commit is contained in:
alschmiedt
2018-11-27 09:55:15 -08:00
parent e9773be499
commit f06bee4eca
6 changed files with 12 additions and 12 deletions

View File

@@ -158,7 +158,7 @@ Blockly.Generator.prototype.allNestedComments = function(block) {
/**
* Generate code for the specified block (and attached blocks).
* @param {Blockly.Block} block The block to generate code for.
* @param {boolean} opt_thisOnly True to generate code for only this block.
* @param {boolean=} opt_thisOnly True to generate code for only this statement.
* @return {string|!Array} For statement blocks, the generated code.
* For value blocks, an array containing the generated code and an
* operator order value. Returns '' if block is null.
@@ -169,7 +169,7 @@ Blockly.Generator.prototype.blockToCode = function(block, opt_thisOnly) {
}
if (block.disabled) {
// Skip past this block if it is disabled.
return this.blockToCode(block.getNextBlock());
return opt_thisOnly ? '' : this.blockToCode(block.getNextBlock());
}
var func = this[block.type];

View File

@@ -188,7 +188,7 @@ Blockly.Dart.quote_ = function(string) {
* Calls any statements following this block.
* @param {!Blockly.Block} block The current block.
* @param {string} code The Dart code created for this block.
* @param {boolean} opt_thisOnly True to generate code for only this block.
* @param {boolean=} opt_thisOnly True to generate code for only this statement.
* @return {string} Dart code with comments and subsequent blocks added.
* @private
*/
@@ -222,7 +222,7 @@ Blockly.Dart.scrub_ = function(block, code, opt_thisOnly) {
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = opt_thisOnly ? "" : Blockly.Dart.blockToCode(nextBlock);
var nextCode = opt_thisOnly ? '' : Blockly.Dart.blockToCode(nextBlock);
return commentCode + code + nextCode;
};

View File

@@ -229,7 +229,7 @@ Blockly.JavaScript.quote_ = function(string) {
* Calls any statements following this block.
* @param {!Blockly.Block} block The current block.
* @param {string} code The JavaScript code created for this block.
* @param {boolean} opt_thisOnly True to generate code for only this block.
* @param {boolean=} opt_thisOnly True to generate code for only this statement.
* @return {string} JavaScript code with comments and subsequent blocks added.
* @private
*/
@@ -265,7 +265,7 @@ Blockly.JavaScript.scrub_ = function(block, code, opt_thisOnly) {
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = opt_thisOnly ? "" : Blockly.JavaScript.blockToCode(nextBlock);
var nextCode = opt_thisOnly ? '' : Blockly.JavaScript.blockToCode(nextBlock);
return commentCode + code + nextCode;
};

View File

@@ -162,7 +162,7 @@ Blockly.Lua.quote_ = function(string) {
* Calls any statements following this block.
* @param {!Blockly.Block} block The current block.
* @param {string} code The Lua code created for this block.
* @param {boolean} opt_thisOnly True to generate code for only this block.
* @param {boolean=} opt_thisOnly True to generate code for only this statement.
* @return {string} Lua code with comments and subsequent blocks added.
* @private
*/
@@ -191,6 +191,6 @@ Blockly.Lua.scrub_ = function(block, code, opt_thisOnly) {
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = opt_thisOnly ? "" : Blockly.Lua.blockToCode(nextBlock);
var nextCode = opt_thisOnly ? '' : Blockly.Lua.blockToCode(nextBlock);
return commentCode + code + nextCode;
};

View File

@@ -218,7 +218,7 @@ Blockly.PHP.quote_ = function(string) {
* Calls any statements following this block.
* @param {!Blockly.Block} block The current block.
* @param {string} code The PHP code created for this block.
* @param {boolean} opt_thisOnly True to generate code for only this block.
* @param {boolean=} opt_thisOnly True to generate code for only this statement.
* @return {string} PHP code with comments and subsequent blocks added.
* @private
*/
@@ -247,7 +247,7 @@ Blockly.PHP.scrub_ = function(block, code, opt_thisOnly) {
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = opt_thisOnly ? "" : Blockly.PHP.blockToCode(nextBlock);
var nextCode = opt_thisOnly ? '' : Blockly.PHP.blockToCode(nextBlock);
return commentCode + code + nextCode;
};

View File

@@ -244,7 +244,7 @@ Blockly.Python.quote_ = function(string) {
* Calls any statements following this block.
* @param {!Blockly.Block} block The current block.
* @param {string} code The Python code created for this block.
* @param {boolean} opt_thisOnly True to generate code for only this block.
* @param {boolean=} opt_thisOnly True to generate code for only this statement.
* @return {string} Python code with comments and subsequent blocks added.
* @private
*/
@@ -278,7 +278,7 @@ Blockly.Python.scrub_ = function(block, code, opt_thisOnly) {
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = opt_thisOnly ? "" : Blockly.Python.blockToCode(nextBlock);
var nextCode = opt_thisOnly ? '' : Blockly.Python.blockToCode(nextBlock);
return commentCode + code + nextCode;
};