public override bool Walk(DictionaryComprehension node) { WalkComprehensionIterators(node); node.Key.Walk(this); node.Value.Walk(this); return(false); }
public override void PostWalk(DictionaryComprehension node) { base.PostWalk(node); PopScope(); if (node.Scope.NeedsLocalsDictionary) { _currentScope.NeedsLocalsDictionary = true; } }
// DictComp public override bool Walk(DictionaryComprehension node) { BitArray save = _bits; _bits = new BitArray(_bits); foreach (ComprehensionIterator iter in node.Iterators) { iter.Walk(this); } node.Key.Walk(this); node.Value.Walk(this); _bits = save; return(false); }
// comp_iter '}' private DictionaryComprehension FinishDictComp(Expression key, Expression value, 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 DictionaryComprehension(key, value, iters); ret.SetLoc(_globalParent, oStart, cEnd); return ret; }
public override bool Walk(DictionaryComprehension node) { node.Parent = _currentScope; PushScope(node.Scope); return base.Walk(node); }
public override void PostWalk(DictionaryComprehension node) { base.PostWalk(node); PopScope(); if (node.Scope.NeedsLocalsDictionary) { _currentScope.NeedsLocalsDictionary = true; } }
public override bool Walk(DictionaryComprehension node) { node.Parent = _currentScope; PushScope(node.Scope); return(base.Walk(node)); }
internal DictComp(DictionaryComprehension comp) : this() { _key = Convert(comp.Key); _value = Convert(comp.Value); _generators = Convert(comp.Iterators); }
// DictComp public override bool Walk(DictionaryComprehension node) { BitArray save = _bits; _bits = new BitArray(_bits); foreach (ComprehensionIterator iter in node.Iterators) { iter.Walk(this); } node.Key.Walk(this); node.Value.Walk(this); _bits = save; return false; }
public string Visit(PyAst.DictionaryComprehension node) => throw CreateNotImplementedEx();