示例#1
0
        public static DoubleLiteralElement Parse(string image, IServiceProvider services)
        {
            ExpressionParserOptions options = services.GetService(typeof(ExpressionParserOptions)) as ExpressionParserOptions;
            DoubleLiteralElement    element = new DoubleLiteralElement();

            try
            {
                double value = options.ParseDouble(image);
                return(new DoubleLiteralElement(value));
            }
            catch (OverflowException)
            {
                element.OnParseOverflow(image);
                return(null);
            }
        }