mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
Merge remote-tracking branch 'upstream/develop' into feature/variable_management_merge_develop
This commit is contained in:
@@ -191,6 +191,7 @@ Blockly.Dart.scrub_ = function(block, code) {
|
||||
if (!block.outputConnection || !block.outputConnection.targetConnection) {
|
||||
// Collect comment for this block.
|
||||
var comment = block.getCommentText();
|
||||
comment = Blockly.utils.wrap(comment, Blockly.Dart.COMMENT_WRAP - 3);
|
||||
if (comment) {
|
||||
if (block.getProcedureDef) {
|
||||
// Use documentation comment for function comments.
|
||||
|
||||
@@ -56,7 +56,6 @@ Blockly.Dart['procedures_defreturn'] = function(block) {
|
||||
}
|
||||
var code = returnType + ' ' + funcName + '(' + args.join(', ') + ') {\n' +
|
||||
branch + returnValue + '}';
|
||||
code = Blockly.Dart.scrub_(block, code);
|
||||
// Add % so as not to collide with helper functions in definitions list.
|
||||
Blockly.Dart.definitions_['%' + funcName] = code;
|
||||
return null;
|
||||
|
||||
@@ -55,7 +55,6 @@ Blockly.JavaScript['procedures_defreturn'] = function(block) {
|
||||
}
|
||||
var code = 'function ' + funcName + '(' + args.join(', ') + ') {\n' +
|
||||
branch + returnValue + '}';
|
||||
code = Blockly.JavaScript.scrub_(block, code);
|
||||
// Add % so as not to collide with helper functions in definitions list.
|
||||
Blockly.JavaScript.definitions_['%' + funcName] = code;
|
||||
return null;
|
||||
|
||||
@@ -57,7 +57,6 @@ Blockly.Lua['procedures_defreturn'] = function(block) {
|
||||
}
|
||||
var code = 'function ' + funcName + '(' + args.join(', ') + ')\n' +
|
||||
branch + returnValue + 'end\n';
|
||||
code = Blockly.Lua.scrub_(block, code);
|
||||
// Add % so as not to collide with helper functions in definitions list.
|
||||
Blockly.Lua.definitions_['%' + funcName] = code;
|
||||
return null;
|
||||
|
||||
@@ -69,7 +69,6 @@ Blockly.PHP['procedures_defreturn'] = function(block) {
|
||||
}
|
||||
var code = 'function ' + funcName + '(' + args.join(', ') + ') {\n' +
|
||||
globals + branch + returnValue + '}';
|
||||
code = Blockly.PHP.scrub_(block, code);
|
||||
// Add % so as not to collide with helper functions in definitions list.
|
||||
Blockly.PHP.definitions_['%' + funcName] = code;
|
||||
return null;
|
||||
|
||||
@@ -71,7 +71,6 @@ Blockly.Python['procedures_defreturn'] = function(block) {
|
||||
}
|
||||
var code = 'def ' + funcName + '(' + args.join(', ') + '):\n' +
|
||||
globals + branch + returnValue;
|
||||
code = Blockly.Python.scrub_(block, code);
|
||||
// Add % so as not to collide with helper functions in definitions list.
|
||||
Blockly.Python.definitions_['%' + funcName] = code;
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user