public VisitTreeWizardContextVisitor( TreeWizard outer, TreeWizard.IContextVisitor visitor, IDictionary <string, object> labels, TreeWizard.TreePattern tpattern) { this._outer = outer; this._visitor = visitor; this._labels = labels; this._tpattern = tpattern; }
public void Visit(object t, string pattern, TreeWizard.IContextVisitor visitor) { TreeWizard.TreePattern tpattern = (TreeWizard.TreePattern) new TreePatternParser(new TreePatternLexer(pattern), this, (ITreeAdaptor) new TreeWizard.TreePatternTreeAdaptor()).Pattern(); if (tpattern == null || tpattern.IsNil || tpattern.GetType() == typeof(TreeWizard.WildcardTreePattern)) { return; } IDictionary <string, object> labels = (IDictionary <string, object>) new Dictionary <string, object>(); int type = tpattern.Type; this.Visit(t, type, (TreeWizard.IContextVisitor) new TreeWizard.VisitTreeWizardContextVisitor(this, visitor, labels, tpattern)); }
protected virtual void VisitCore( object t, object parent, int childIndex, int ttype, TreeWizard.IContextVisitor visitor) { if (t == null) { return; } if (this.adaptor.GetType(t) == ttype) { visitor.Visit(t, parent, childIndex, (IDictionary <string, object>)null); } int childCount = this.adaptor.GetChildCount(t); for (int index = 0; index < childCount; ++index) { this.VisitCore(this.adaptor.GetChild(t, index), t, index, ttype, visitor); } }
public void Visit(object t, int ttype, TreeWizard.IContextVisitor visitor) { this.VisitCore(t, (object)null, 0, ttype, visitor); }
public VisitTreeWizardContextVisitor(TreeWizard outer, TreeWizard.IContextVisitor visitor, IDictionary<string, object> labels, TreeWizard.TreePattern tpattern) { this._outer = outer; this._visitor = visitor; this._labels = labels; this._tpattern = tpattern; }