示例#1
0
    internal void RenderCode(CodeRender cr)
    {
        cr.StartTopLevel();
        var i = 0;

        mf.ForAllFuncs(f =>
        {
            cr.Push(null);
            cr.Push(f);
            f.RenderCode(cr, null, null);
            cr.Pop(f);
            CreateArgListGui(f.args, cr, "(", ")");
            if (f.freevars.Count > 0)
            {
                cr.Scale(0.7, () => CreateArgListGui(f.freevars, cr, "[", "]"));
            }
            cr.Pop(null);
            cr.SaveFunctionLHS();

            cr.Push(null);
            cr.Text("=", equalsspacing, equalsspacing);
            f.root.RenderCode(cr, null);
            cr.Pop(null);

            cr.Function(i++, f.Depth());
        });
    }