more debugging

This commit is contained in:
daarond
2015-05-10 00:40:01 -05:00
parent da2e0710bf
commit 5e7f92cec3
5 changed files with 23 additions and 25 deletions

View File

@@ -120,6 +120,15 @@ Blockly.PHP.getDistinctName = function(name, type) {
return '$' + safeName;
};
Blockly.PHP.getName = function(name, type) {
var normalized = name.toLowerCase() + '_' + type;
if (normalized in this.variableDB_.db_) {
return this.variableDB_.db_[normalized];
}
var safeName = this.getDistinctName(name, type);
this.variableDB_[normalized] = safeName;
return safeName;
};
/**
* Prepend the generated code with the variable definitions.