public void Reset() { GlobalNames.Clear(); LocalNames.Clear(); LocalNames.Add(new Dictionary <Object /*!*/, string /*!*/>()); UsedNames.Clear(); CurrentCounters.Clear(); GlobalPlusLocalNames.Clear(); }
public string CreateVariableName(string name) { name = StringUtility.ToCamelCase(name); name = NameGenerator.Default.EnsureUniqueName(name, LocalNames); if (SyntaxFacts.GetKeywordKind(name) != SyntaxKind.None) { name = $"@{name}"; } LocalNames.Add(name); return(name); }