Exemplo n.º 1
0
        protected internal override Expression VisitDo(DoCSharpStatement node)
        {
            PushLabelInfo(node);

            var body = Visit(node.Body);

            PopLabelInfo(out LabelTarget @break, out LabelTarget @continue);

            var test = Visit(node.Test);

            return(node.Update(@break, @continue, body, test));
        }
        protected internal override Expression VisitDo(DoCSharpStatement node)
        {
            PushLabelInfo(node);

            var body = Visit(node.Body);

            var @break = default(LabelTarget);
            var @continue = default(LabelTarget);
            PopLabelInfo(out @break, out @continue);

            var test = Visit(node.Test);

            return node.Update(@break, @continue, body, test);
        }
        protected internal override Expression VisitDo(DoCSharpStatement node)
        {
            // NB: If we do optimizations involving variables, we'll need to track scopes here.

            var variables = VisitAndConvert(node.Locals, nameof(VisitFor));

            PushLabelInfo(node);

            var body = Visit(node.Body);

            PopLabelInfo(out LabelTarget @break, out LabelTarget @continue);

            var test = Visit(node.Test);

            return(node.Update(@break, @continue, body, test, variables));
        }