Revert "Remove apparently unneeded scrub on procedures."

This reverts commit 2be214ca74.
This commit is contained in:
Neil Fraser
2016-08-24 03:05:30 -07:00
parent b614cfb1c1
commit 591f6bfe4c
5 changed files with 5 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ 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;

View File

@@ -55,6 +55,7 @@ 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;

View File

@@ -57,6 +57,7 @@ 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;

View File

@@ -69,6 +69,7 @@ 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;

View File

@@ -71,6 +71,7 @@ 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;