public override void PostWalk(SetComprehension node) { base.PostWalk(node); PopScope(); if (node.Scope.NeedsLocalsDictionary) { _currentScope.NeedsLocalsDictionary = true; } }
// SetComp public override bool Walk(SetComprehension 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); }
// comp_iter '}' private SetComprehension FinishSetComp(Expression item, int oStart, int oEnd) { ComprehensionIterator[] iters = ParseCompIter(); Eat(TokenKind.RightBrace); var cStart = GetStart(); var cEnd = GetEnd(); if (_sink != null) { _sink.MatchPair( new SourceSpan(_tokenizer.IndexToLocation(oStart), _tokenizer.IndexToLocation(oEnd)), new SourceSpan(_tokenizer.IndexToLocation(cStart), _tokenizer.IndexToLocation(cEnd)), 1 ); } var ret = new SetComprehension(item, iters); ret.SetLoc(_globalParent, oStart, cEnd); return ret; }
public override bool Walk(SetComprehension node) { node.Parent = _currentScope; PushScope(node.Scope); return base.Walk(node); }
public override void PostWalk(SetComprehension node) { base.PostWalk(node); PopScope(); if (node.Scope.NeedsLocalsDictionary) { _currentScope.NeedsLocalsDictionary = true; } }
public override bool Walk(SetComprehension node) { node.Parent = _currentScope; PushScope(node.Scope); return(base.Walk(node)); }
internal SetComp(SetComprehension comp) : this() { _elt = Convert(comp.Item); _generators = Convert(comp.Iterators); }
public override bool Walk(SetComprehension node) { WalkComprehensionIterators(node); node.Item.Walk(this); return(false); }
// SetComp public override bool Walk(SetComprehension 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; }
public string Visit(PyAst.SetComprehension node) => throw CreateNotImplementedEx();