Ejemplo n.º 1
0
 protected override string VisitSet(Set S)
 {
     return @"\{" + String.Join(", ", S.Members.Select(i => Visit(i))) + @"\}";
 }
Ejemplo n.º 2
0
 private PatternVariable(string Name, Set Ring, Func<Expression, bool> Condition)
     : base(Name, Ring)
 {
     condition = Condition;
 }
Ejemplo n.º 3
0
 protected Variable(string Name, Set Ring)
     : base(Name)
 {
     ring = Ring;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new variable.
 /// </summary>
 /// <param name="Name"></param>
 /// <returns></returns>
 public static Variable New(string Name, Set Ring)
 {
     return new Variable(Name, Ring);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Create a new variable with a condition callback for matching.
 /// </summary>
 /// <param name="Name"></param>
 /// <param Name="Ring"></param>
 /// <param name="Condition">A function that should return true if the variable is allowed to match the given Expression.</param>
 /// <returns></returns>
 public static PatternVariable New(string Name, Set Ring, Func<Expression, bool> Condition)
 {
     return new PatternVariable(Name, Ring, Condition);
 }