Exemple #1
0
        // ListComp
        public override bool Walk(ListComprehension node)
        {
            BitArray save = _bits;
            _bits = new BitArray(_bits);

            foreach (ComprehensionIterator iter in node.Iterators) {
                iter.Walk(this);
            }
            node.Item.Walk(this);

            _bits = save;
            return false;
        }
Exemple #2
0
 public override void PostWalk(ListComprehension node)
 {
     if (_curUnit.ProjectState.LanguageVersion.Is7x()) {
         Debug.Assert(_scope is ComprehensionScope);
         _scope = _scope.OuterScope;
     }
     base.PostWalk(node);
 }
Exemple #3
0
 // ListComprehension
 public override bool Walk(ListComprehension node)
 {
     return ShouldWalkWorker(node);
 }
Exemple #4
0
        public override bool Walk(ListComprehension node)
        {
            // List comprehension runs in a new scope in 3.x, runs in the same
            // scope in 2.x.  But these don't get their own analysis units
            // because they are still just expressions.
            if (_curUnit.ProjectState.LanguageVersion.Is7x()) {
                EnsureComprehensionScope(node, MakeListComprehensionScope);
            }

            return base.Walk(node);
        }
Exemple #5
0
 public override void PostWalk(ListComprehension node)
 {
     PostWalkWorker(node);
 }