예제 #1
0
 public override ICollection <IParseTree> Evaluate(IParseTree t)
 {
     if (invert)
     {
         return(new List <IParseTree>());
     }
     // !* is weird but valid (empty)
     return(Trees.GetDescendants(t));
 }
예제 #2
0
        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);
        }