code: List<String> parseJsStringArray(String input)
        throws ParseException {
      List<String> results = new ArrayList<>();
      int indexStart = input.indexOf('[');
      int indexEnd = input.lastIndexOf(']');
      if ((indexStart == -1) || (indexEnd == -1)) {
        throw new ParseException("Syntax error when parsing JS array", true /* fatal */);
      }
      String innerValues = input.substring(indexStart + 1, indexEnd);
  
      if (!innerValues.trim().isEmpty()) {
        valueMatcher.reset(innerValues);
        for (;;) {
          // Parse the current string literal.
          if (!valueMatcher.lookingAt()) {
            throw new ParseException("Syntax error in JS String literal", true /* fatal */);
          }
          // Add it to the results.
          results.add(valueMatcher.group(1) != null ?
              valueMatcher.group(1) : valueMatcher.group(2));
          if (valueMatcher.hitEnd()) {
            break;
          }
          // Ensure there is a comma after the value.
          if (innerValues.charAt(valueMatcher.end()) != ',') {
            throw new ParseException("Missing comma in string array", true /* fatal */);
          }
          // Move to the next value.
          valueMatcher.region(valueMatcher.end() + 1, valueMatcher.regionEnd());
        }
      }
      return results;
    }
docs: Parses a JavaScript array of string literals. (eg: ['a', 'b', "c"]).
  @param input A string containing a JavaScript array of string literals.
  @return A list of parsed string literals.
  @throws ParseException Thrown if there is a syntax error with the input.