Exemple #1
0
            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);
            }
Exemple #2
0
 public Matcher(PruneNode _enclosing, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
     : base(this._enclosing, newNodeNames, coindexer)
 {
     this._enclosing = _enclosing;
 }