/// <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(); }
/// <summary> /// Used to generate code for functions /// </summary> /// <param name="ilcg"></param> public void EnterGenerationScope(ILGenerator ilcg) { ScopedGenerators.Push(ilcg); }