Skip to content

Commit 87232c6

Browse files
committed
Responded to review comments
1 parent 21e046d commit 87232c6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/editor/extended_python_generator.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)