pub fn parse_subscript(s: &str, endchar: char) -> Option<usize>
Parse a subscript in string s. Return the position after the closing bracket, or None on error.
Port of parse_subscript() from lex.c