docs: function isValidRegExp(context: ParserContext): boolean {
    const previousNonWsToken = context.token(context.count() - 1);
  
    let previousToken;
    if (context.defaultData.text !== "") {
      previousToken = context.createToken("default", context.defaultData.text);
    } else {
      previousToken = previousNonWsToken;
      // Okay if there is no previous token.
      if (!previousToken) return true;
    }
  
    // Since JavaScript doesn't require statement terminators, if the previous
    // token was whitespace and contained a newline, then we're good.
    if (
      previousToken.name === "default" &&
      previousToken.value.indexOf("\n") >= 0
    )
      return true;
  
    // In these case the / stands for division.
    if (util.contains(["keyword", "ident", "number"], previousNonWsToken.name))
      return false;
  
    if (
      previousNonWsToken.name === "punctuation" &&
      !util.contains(["(", "{", "[", ",", ";"], previousNonWsToken.value)
    )
      return false;
  
    return true;
  }