NameManager.ProcedureNameManager

public static final class NameManager.ProcedureNameManager extends NameManager

The NameManager for procedure names.

Inherited Field Summary

Public Constructor Summary

Public Method Summary

String
generateExternalName(Set<String> reservedWords, String baseName)
Convert a Blockly entity name to a legal exportable entity name.

Inherited Method Summary

Public Constructors

public NameManager.ProcedureNameManager ()

Public Methods

public String generateExternalName (Set<String> reservedWords, String baseName)

Convert a Blockly entity name to a legal exportable entity name. Ensure that this is a new name not overlapping any previously defined name. Also check against list of reserved words for the current language and ensure name doesn't collide. The new name will conform to the [_A-Za-z][_A-Za-z0-9]* format that most languages consider legal for variables.

Parameters
reservedWords Reserved words in the target language.
baseName The name to convert.
Returns
  • A legal variable or procedure name in the target language.