mirror of
https://github.com/google/blockly.git
synced 2026-01-13 11:57:10 +01:00
Add warning to blockToCode (#4492)
* Add warning to blockToCode * Address PR comments
This commit is contained in:
@@ -125,6 +125,12 @@ Blockly.Python.ORDER_OVERRIDES = [
|
||||
[Blockly.Python.ORDER_LOGICAL_OR, Blockly.Python.ORDER_LOGICAL_OR]
|
||||
];
|
||||
|
||||
/**
|
||||
* Whether the init method has been called.
|
||||
* @type {?boolean}
|
||||
*/
|
||||
Blockly.Python.isInitialized = false;
|
||||
|
||||
/**
|
||||
* Initialise the database of variable names.
|
||||
* @param {!Blockly.Workspace} workspace Workspace to generate code from.
|
||||
@@ -166,6 +172,7 @@ Blockly.Python.init = function(workspace) {
|
||||
}
|
||||
|
||||
Blockly.Python.definitions_['variables'] = defvars.join('\n');
|
||||
this.isInitialized = true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user