示例#1
0
        protected override void DoEmitCode(CompilerTarget target, StackSemantics stackSemantics)
        {
            //instantiate macro for the current target
            MacroSession session = null;

            try
            {
                //Acquire current macro session
                session = target.AcquireMacroSession();

                //Expand macro
                var justEffect = stackSemantics == StackSemantics.Effect;
                var node = session.ExpandMacro(this, justEffect);

                //Emit generated code
                node.EmitCode(target, stackSemantics);
            }
            finally
            {
                if (session != null)
                    target.ReleaseMacroSession(session);
            }
        }