public override ICollection <IParseTree> Evaluate(IParseTree t) { if (invert) { return(new List <IParseTree>()); } // !* is weird but valid (empty) return(Trees.GetDescendants(t)); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var context = value as IParseTree; var children = new List <IParseTree>(); foreach (var child in Trees.GetDescendants(context)) { if (child.Parent == context) { children.Add(child); } } return(children); }