Пример #1
0
 /// <summary>
 /// Used when code gen for functions is done
 /// </summary>
 public void LeaveGenerationScope()
 {
     if (EntryPoint.GetILGenerator() == ScopedGenerators.Peek())
     {
         throw new InvalidOperationException("Can't Leave the Scope of the Main function");
     }
     ScopedGenerators.Pop();
 }
Пример #2
0
 /// <summary>
 /// Used to generate code for functions
 /// </summary>
 /// <param name="ilcg"></param>
 public void EnterGenerationScope(ILGenerator ilcg)
 {
     ScopedGenerators.Push(ilcg);
 }