While.AST.Statements.Write.Compile C# (CSharp) Method

Compile() public method

public Compile ( ILGenerator il ) : void
il System.Reflection.Emit.ILGenerator
return void
        public override void Compile(ILGenerator il)
        {
            EmitDebugInfo(il, 0, false);
            Expression.Compile(il);
            MethodInfo mi;
            Type[] argTypes = new Type[1];
            if (Expression is TypedExpression<bool>) {
                argTypes[0] = typeof(bool);
            } else if (Expression is TypedExpression<int>) {
                argTypes[0] = typeof(int);
            }
            mi = typeof(System.Console).GetMethod("WriteLine", argTypes);
            il.Emit(OpCodes.Call, mi);
        }