Beispiel #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;
        }
Beispiel #2
0
 public override void PostWalk(ListComprehension node)
 {
     if (_curUnit.ProjectState.LanguageVersion.Is7x()) {
         Debug.Assert(_scope is ComprehensionScope);
         _scope = _scope.OuterScope;
     }
     base.PostWalk(node);
 }
Beispiel #3
0
 // ListComprehension
 public override bool Walk(ListComprehension node)
 {
     return ShouldWalkWorker(node);
 }
Beispiel #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);
        }
Beispiel #5
0
 public override void PostWalk(ListComprehension node)
 {
     PostWalkWorker(node);
 }