From: handa Date: Thu, 8 Oct 2009 13:20:52 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=822f9574d588bc1c847a2de1ab2e03a345f7a6e8;p=m17n%2Fm17n-lib-cs.git *** empty log message *** --- diff --git a/XmlExpr.cs b/XmlExpr.cs index eff1dc6..e18f7d3 100644 --- a/XmlExpr.cs +++ b/XmlExpr.cs @@ -1926,6 +1926,19 @@ namespace System.Xml.Expression return terms; } + public static Term Eval (Domain domain, Term[] terms) + { + Term result = new Term (0); + foreach (Term term in terms) + { + result = term; + if (result.Objval is Funcall) + while ((result = result.Eval (domain)).Objval is Funcall); + } + return result; + } + + public Xexpression (Domain domain, XmlNode node) { terms = ParseTerms (domain, node);