public IDataType Evaluate(IToken token, IConfiguration configuration)
        {
            configuration?.State?.Reset();
            var evaluation = new Evaluation(CalcEngine, configuration);

            return(token?.Accept <IDataType <TDataEnum> >(evaluation));
        }
Esempio n. 2
0
        public static string ToLaTeX(this IToken token)
        {
            var expr = token.Accept(new LaTeXPrinter());

            Debug.WriteLine(expr);
            return(expr);
        }
Esempio n. 3
0
 public static string Print(this IToken token, TokenPrinter.FixType fixType = TokenPrinter.DefaultFixType)
 => token.Accept(new TokenPrinter(fixType));