function tokenJsExpressionInStringTemplate(stream, state) {
    const style = jsMode.token(stream, state[kJsState]);
    // track ${ , } to determine when the expression is complete.
    if (style === 'string-2' && tokenIndexOfUnescaped(stream, '${') >= 0) {
      // case nested ${
      state[kJsExprDepthInStringTemplate] += 1;
    } else if (style === 'string-2' && state[kJsState].lastType === '}') {
      // case expression-ending }
      // Note: must check BOTH style and lastType.
      // If there are blank spaces after },
      // when tokenizing the blank spaces, the style is null but the lastType remains to be }
      // (the one with meaningful token)
      // once it reaches back to 0, the logic would let the parent local mode handle the next token
      if ((state[kJsExprDepthInStringTemplate] -= 1) <= 0) {
        state[kInJsExprInStringTemplate] = false;
        const jsExpr = state[kLocalMode][kTokenizePostJsExpr];
        if (jsExpr) {
          // unless the mode also explicitly specify a tokenizer.
          state[kTokenizePostJsExpr] = jsExpr;
        }
      }
    }
    return style;
  }
@return the position of '${' relative to the
        current token start position, i.e., stream.start; -1 otherwise.