Boo.Lang.Compiler.Steps.EmitAssembly.OnConditionalExpression C# (CSharp) Метод

OnConditionalExpression() публичный Метод

public OnConditionalExpression ( Boo.Lang.Compiler.Ast.ConditionalExpression node ) : void
node Boo.Lang.Compiler.Ast.ConditionalExpression
Результат void
        public override void OnConditionalExpression(ConditionalExpression node)
        {
            var type = GetExpressionType(node);

            var endLabel = _il.DefineLabel();

            EmitBranchFalse(node.Condition, endLabel);
            LoadExpressionWithType(type, node.TrueValue);

            var elseEndLabel = _il.DefineLabel();
            _il.Emit(OpCodes.Br, elseEndLabel);
            _il.MarkLabel(endLabel);

            endLabel = elseEndLabel;
            LoadExpressionWithType(type, node.FalseValue);

            _il.MarkLabel(endLabel);

            PushType(type);
        }
EmitAssembly