public Identifier GenSym() { var i = 0u; var nm = default(string); do { nm = Lexemes.UIntToIdentifier(i++, 0x1); }while (Lexemes.IsJavaScriptReservedName(nm) || globals.Contains(nm) || BoundInThisOrOuterScope(nm) || boundInChildScope.Contains(nm)); boundInThisScope.Add(nm); if (parent != null) { parent.BoundByChild(nm); } return(new Identifier(nm)); }
public static Identifier FromString(string str) { return(new Identifier(Lexemes.StringToIdentifier(str))); }
public static Identifier FromJavaScript(string str) { return(new Identifier(Lexemes.JavaScriptToIdentifier(str))); }