fix: Rename Generator to CodeGenerator (#6585)

Stops collisions with ES6's Generator.
The old Blockly.Generator still exists as a name, but is now deprecated.
This commit is contained in:
Neil Fraser
2022-10-28 01:59:00 +02:00
committed by GitHub
parent 2311a94b03
commit e90aba9273
46 changed files with 155 additions and 158 deletions

View File

@@ -373,7 +373,7 @@ Code.renderContent = function() {
/**
* Attempt to generate the code and display it in the UI, pretty printed.
* @param generator {!Blockly.Generator} The generator to use.
* @param generator {!Blockly.CodeGenerator} The generator to use.
*/
Code.attemptCodeGeneration = function(generator) {
var content = document.getElementById('content_' + Code.selected);
@@ -388,7 +388,7 @@ Code.attemptCodeGeneration = function(generator) {
/**
* Check whether all blocks in use have generator functions.
* @param generator {!Blockly.Generator} The generator to use.
* @param generator {!Blockly.CodeGenerator} The generator to use.
*/
Code.checkAllGeneratorFunctionsDefined = function(generator) {
var blocks = Code.workspace.getAllBlocks(false);