File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export class ExtendedPythonGenerator extends PythonGenerator {
4141
4242 init ( workspace : Blockly . Workspace ) {
4343 super . init ( workspace ) ;
44- // This will have all variables in the defintion 'variables' so we will need to destroy it and make our own
44+ // This will have all variables in the definition 'variables' so we will need to make it contain only the developer variables
4545 delete this . definitions_ [ 'variables' ] ;
4646
4747 const defvars = [ ] ;
@@ -53,9 +53,12 @@ export class ExtendedPythonGenerator extends PythonGenerator {
5353 ) ;
5454 }
5555 this . definitions_ [ 'variables' ] = defvars . join ( '\n' ) ;
56- // user variables are dealt with in init code generation
5756 }
5857
58+ /*
59+ * This is called from the python generator for the mrc_class_method_def for the
60+ * init method
61+ */
5962 defineClassVariables ( workspace : Blockly . Workspace ) : string {
6063 let variableDefinitions = '' ;
6164
@@ -64,7 +67,7 @@ export class ExtendedPythonGenerator extends PythonGenerator {
6467 }
6568 return variableDefinitions ;
6669 }
67- getVariableName ( name : string ) : string {
70+ getVariableName ( nameOrId : string ) : string {
6871 const varName = super . getVariableName ( name ) ;
6972 return "self." + varName ;
7073 }
You can’t perform that action at this time.
0 commit comments