clang-format core/names.js

This commit is contained in:
kozbial
2021-08-04 15:46:59 -07:00
committed by Monica Kozbial
parent 03d4d4265f
commit 20531314d8

View File

@@ -90,7 +90,8 @@ Names.prototype.setVariableMap = function(map) {
*/
Names.prototype.getNameForUserVariable_ = function(id) {
if (!this.variableMap_) {
console.warn('Deprecated call to Names.prototype.getName without ' +
console.warn(
'Deprecated call to Names.prototype.getName without ' +
'defining a variable map. To fix, add the following code in your ' +
'generator\'s init() function:\n' +
'Blockly.YourGeneratorName.nameDB_.setVariableMap(' +
@@ -121,12 +122,12 @@ Names.prototype.populateVariables = function(workspace) {
* @param {!Workspace} workspace Workspace to generate procedures from.
*/
Names.prototype.populateProcedures = function(workspace) {
let procedures = goog.module.get('Blockly.Procedures').allProcedures(workspace);
let procedures =
goog.module.get('Blockly.Procedures').allProcedures(workspace);
// Flatten the return vs no-return procedure lists.
procedures = procedures[0].concat(procedures[1]);
for (let i = 0; i < procedures.length; i++) {
this.getName(
procedures[i][0], internalConstants.PROCEDURE_CATEGORY_NAME);
this.getName(procedures[i][0], internalConstants.PROCEDURE_CATEGORY_NAME);
}
};