feat: Improved procedure arg interaction. (#3527)

* feat: Improved procedure arg interaction.

* Added docs.

* Fixed typos and typings.

* Fixed typings?

* Changed visibility to private.
This commit is contained in:
Beka Westberg
2020-01-07 13:55:46 -08:00
committed by alschmiedt
parent 267877115f
commit 6d1bb201f7
8 changed files with 166 additions and 120 deletions

View File

@@ -384,6 +384,21 @@ Blockly.VariableMap.prototype.getAllVariables = function() {
return all_variables;
};
/**
* Returns all of the variable names of all types.
* @return {!Array<string>} All of the variable names of all types.
*/
Blockly.VariableMap.prototype.getAllVariableNames = function() {
var allNames = [];
for (var key in this.variableMap_) {
var variables = this.variableMap_[key];
for (var i = 0, variable; (variable = variables[i]); i++) {
allNames.push(variable.name);
}
}
return allNames;
};
/**
* Find all the uses of a named variable.
* @param {string} id ID of the variable to find.