/// <summary> /// Add a child scope to a parent scope. This should be called in the constructor of the child scope /// </summary> /// <param name="parentScope">The parent scope</param> /// <param name="childScope">The child scope</param> protected static void RegisterChildScope(LanguageScope parentScope, LanguageScope childScope) { if (ReferenceEquals(parentScope._childScopes, null)) { parentScope._childScopes = new List <LanguageScope>(); } parentScope._childScopes.Add(childScope); }
protected LanguageScope(LanguageScope parentScope, string scopeName) : base(parentScope) { ObjectName = scopeName; }
protected LanguageScope(LanguageScope parentScope) : base(parentScope) { ObjectName = "scope_" + ObjectId.ToString("X"); }