function optionalidentifier(context, isName, preserve) {
    if (!state.tokens.next.identifier) {
      return;
    }

    if (!preserve) {
      advance();
    }

    var curr = state.tokens.curr;

    if (isReserved(context, curr) && !(isName && state.inES5())) {
      warning("W024", state.tokens.curr, state.tokens.curr.id);
    }

    return curr.value;
  }
Retrieve the value of the next token if it is an identifier and optionally
advance the parser.

@param {number} context - the parsing context; see `prod-params.js` for
                          more information
@param {boolean} [isName] - `true` if an IdentifierName should be consumed
                            (e.g. object properties)
@param {boolean} [preserve] - `true` if the token should not be consumed

@returns {string|undefined} - the value of the identifier, if present