public void NewScope() { if (RootScope is null) { RootScope = new Scope(0); CurrentScope = RootScope; CurrentScope.MostRecentScope = RootScope; ScopeCounter = 0; } else { CurrentScope.AddDescendant(ScopeCounter, CurrentScope); ScopeCounter++; CurrentScope = CurrentScope.MostRecentScope; } Diagnostics.Semantic_ReportAddingNewScope(ScopeCounter, CurrentScope); }