Clean up temporary generator data.

This commit is contained in:
Neil Fraser 2015-08-14 18:26:05 -07:00
parent 93c371bc33
commit 0274763beb
10 changed files with 116 additions and 89 deletions
generators

View file

@ -121,6 +121,10 @@ Blockly.PHP.finish = function(code) {
for (var name in Blockly.PHP.definitions_) {
definitions.push(Blockly.PHP.definitions_[name]);
}
// Clean up temporary data.
delete Blockly.PHP.definitions_;
delete Blockly.PHP.functionNames_;
Blockly.PHP.variableDB_.reset();
return definitions.join('\n\n') + '\n\n\n' + code;
};