function handleSupSubscript(name) {
              var symbolToken = this.nextToken;
              var symbol = symbolToken.text;
              this.consume();
              var group = this.parseGroup();

              if (!group) {
                  if (!this.settings.throwOnError && this.nextToken.text[0] === "\\") {
                      return this.handleUnsupportedCmd();
                  } else {
                      throw new _ParseError2.default("Expected group after '" + symbol + "'", symbolToken);
                  }
              } else if (group.isFunction) {
                  // ^ and _ have a greediness, so handle interactions with functions'
                  // greediness
                  var funcGreediness = _functions2.default[group.result].greediness;
                  if (funcGreediness > Parser.SUPSUB_GREEDINESS) {
                      return this.parseFunction(group);
                  } else {
                      throw new _ParseError2.default("Got function '" + group.result + "' with no arguments " + "as " + name, symbolToken);
                  }
              } else {
                  return group.result;
              }
          }
/**
           * Handle a subscript or superscript with nice errors.
           */
Handle a subscript or superscript with nice errors.
Handle a subscript or superscript with nice errors .
function handleSupSubscript(name) {
              var symbolToken = this.nextToken;
              var symbol = symbolToken.text;
              this.consume();
              var group = this.parseGroup();
              if (!group) {
                  if (!this.settings.throwOnError && this.nextToken.text[0] === "\\") {
                      return this.handleUnsupportedCmd();
                  } else {
                      throw new _ParseError2.default("Expected group after '" + symbol + "'", symbolToken);
                  }
              } else if (group.isFunction) {
                  var funcGreediness = _functions2.default[group.result].greediness;
                  if (funcGreediness > Parser.SUPSUB_GREEDINESS) {
                      return this.parseFunction(group);
                  } else {
                      throw new _ParseError2.default("Got function '" + group.result + "' with no arguments " + "as " + name, symbolToken);
                  }
              } else {
                  return group.result;
              }
          }
function handleSupSubscript ( name ) { var symbolToken = this . nextToken ; var symbol = symbolToken . text ; this . consume ( ) ; var group = this . parseGroup ( ) ; if ( ! group ) { if ( ! this . settings . throwOnError && this . nextToken . text [ 0 ] === "\\" ) { return this . handleUnsupportedCmd ( ) ; } else { throw new _ParseError2 . default ( "Expected group after '" + symbol + "'" , symbolToken ) ; } } else if ( group . isFunction ) { var funcGreediness = _functions2 . default [ group . result ] . greediness ; if ( funcGreediness > Parser . SUPSUB_GREEDINESS ) { return this . parseFunction ( group ) ; } else { throw new _ParseError2 . default ( "Got function '" + group . result + "' with no arguments " + "as " + name , symbolToken ) ; } } else { return group . result ; } }
Handle a subscript or superscript with nice errors.
Handle a subscript or superscript with nice errors .
// ^ and _ have a greediness, so handle interactions with functions' // greediness