public Context MakeContext(object argument, Context context) { Context newcontext = new Context(); if (!MatchUtilities.MatchObjects(this.head, argument, newcontext)) return null; newcontext.SetParent(context); return newcontext; }
public void DontMatchDifferentAtoms() { MatchBody match = new MatchBody(new Atom("a"), new ConstantExpression(1)); var context = match.MakeContext(new Atom("b"), null); Assert.IsNull(context); }