public IDataType Evaluate(IToken token, IConfiguration configuration) { configuration?.State?.Reset(); var evaluation = new Evaluation(CalcEngine, configuration); return(token?.Accept <IDataType <TDataEnum> >(evaluation)); }
public static string ToLaTeX(this IToken token) { var expr = token.Accept(new LaTeXPrinter()); Debug.WriteLine(expr); return(expr); }
public static string Print(this IToken token, TokenPrinter.FixType fixType = TokenPrinter.DefaultFixType) => token.Accept(new TokenPrinter(fixType));