Example #1
0
 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);
 }