Beispiel #1
0
        internal static List <TermExpr <T_Identifier> > GetTerms(BoolExpr <T_Identifier> expression)
        {
            DebugCheck.NotNull(expression);
            var visitor = new LeafVisitor <T_Identifier>();

            expression.Accept(visitor);
            return(visitor._terms);
        }
        internal static List <TermExpr <T_Identifier> > GetTerms(
            BoolExpr <T_Identifier> expression)
        {
            LeafVisitor <T_Identifier> leafVisitor = new LeafVisitor <T_Identifier>();

            expression.Accept <bool>((Visitor <T_Identifier, bool>)leafVisitor);
            return(leafVisitor._terms);
        }
Beispiel #3
0
 /// <summary>
 ///     Returns all term expressions below this node.
 /// </summary>
 internal List <TermExpr <T_Identifier> > GetTerms()
 {
     return(LeafVisitor <T_Identifier> .GetTerms(this));
 }
 internal static IEnumerable <T_Identifier> GetLeaves(BoolExpr <T_Identifier> expression)
 {
     return(LeafVisitor <T_Identifier> .GetTerms(expression).Select <TermExpr <T_Identifier>, T_Identifier>((Func <TermExpr <T_Identifier>, T_Identifier>)(term => term.Identifier)));
 }