Skip to main content

parse_closing_parens

Function parse_closing_parens 

Source
pub fn parse_closing_parens<T>(
    src: &str,
    parse: impl Fn(&str) -> Result<T, ParseError>,
) -> Result<T, ParseError>
Expand description

Parses formula text as typed into a cell with parse, closing up to eight missing ) at the end as Excel does (SUM(1,2 enters SUM(1,2)). When no number of ) makes it parse, the error describes the text as typed: 1+ is “unexpected end of formula”, not “unexpected )”.