mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
Clean up temporary generator data.
This commit is contained in:
@@ -128,6 +128,10 @@ Blockly.Python.finish = function(code) {
|
||||
definitions.push(def);
|
||||
}
|
||||
}
|
||||
// Clean up temporary data.
|
||||
delete Blockly.Python.definitions_;
|
||||
delete Blockly.Python.functionNames_;
|
||||
Blockly.Python.variableDB_.reset();
|
||||
var allDefs = imports.join('\n') + '\n\n' + definitions.join('\n\n');
|
||||
return allDefs.replace(/\n\n+/g, '\n\n').replace(/\n*$/, '\n\n\n') + code;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user