public override Tree Evaluate(Tree tree, TregexMatcher tregex) { bool prunedWholeTree = false; foreach (TsurgeonMatcher child in this.childMatcher) { Tree nodeToPrune = child.Evaluate(tree, tregex); if (PruneNode.PruneHelper(tree, nodeToPrune) == null) { prunedWholeTree = true; } } return(prunedWholeTree ? null : tree); }
public Matcher(PruneNode _enclosing, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer) : base(this._enclosing, newNodeNames, coindexer) { this._enclosing = _enclosing; }