/// <summary> /// Fill a new method /// </summary> /// <param name="comp">compilation</param> /// <param name="subProc">sub process object</param> /// <param name="converter">language converter</param> /// <param name="f">new function</param> /// <param name="file">writing in</param> public static void FillNewMethod(ICompilateurInstance comp, IProcess subProc, ICodeConverter converter, IFunction f, FinalFile file) { // la fonction est implémentée converter.PushFunction(converter.CurrentFunction); f.PropagateControlFlow(converter.CurrentFunction); converter.SetCurrentFunction(f); subProc.FunctionName = converter.ProcessAsFunction; converter.CurrentFunction.ForwardControlFlowSub(); comp.Convert(converter, subProc, file); converter.CurrentFunction.BackwardControlFlowSub(); converter.SetCurrentFunction(converter.PopFunction()); }
public void Convert(ICodeConverter converter, IProcess proc, FinalFile file) { this.cachedComp.PopProcess(); converter.SetCurrentFunction(converter.PopFunction()); }