mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Update procedure generators for PHP and Python to declare developer variables as globals
This commit is contained in:
@@ -43,6 +43,12 @@ Blockly.PHP['procedures_defreturn'] = function(block) {
|
||||
Blockly.Variables.NAME_TYPE));
|
||||
}
|
||||
}
|
||||
// Add developer variables.
|
||||
var devVarList = Blockly.Variables.allDeveloperVariables(workspace);
|
||||
for (var i = 0; i < devVarList.length; i++) {
|
||||
globals.push(Blockly.PHP.variableDB_.getName(devVarList[i],
|
||||
Blockly.Names.DEVELOPER_VARIABLE_TYPE));
|
||||
}
|
||||
globals = globals.length ? Blockly.PHP.INDENT + 'global ' + globals.join(', ') + ';\n' : '';
|
||||
|
||||
var funcName = Blockly.PHP.variableDB_.getName(
|
||||
|
||||
Reference in New Issue
Block a user