function ParseError(message, lexer, position) {
                    var error = "KaTeX parse error: " + message;

                    if (lexer !== undefined && position !== undefined) {
                        // If we have the input and a position, make the error a bit fancier

                        // Prepend some information
                        error += " at position " + position + ": ";

                        // Get the input
                        var input = lexer._input;
                        // Insert a combining underscore at the correct position
                        input = input.slice(0, position) + "\u0332" +
                            input.slice(position);

                        // Extract some context from the input and add it to the error
                        var begin = Math.max(0, position - 15);
                        var end = position + 15;
                        error += input.slice(begin, end);
                    }

                    // Some hackery to make ParseError a prototype of Error
                    // See http://stackoverflow.com/a/8460753
                    var self = new Error(error);
                    self.name = "ParseError";
                    self.__proto__ = ParseError.prototype;

                    self.position = position;
                    return self;
                }
Sometimes, groups perform special rules when they have superscripts or
subscripts attached to them. This function lets the `supsub` group know that
its inner element should handle the superscripts and subscripts instead of
handling them itself.