code: private OptionElement readOption(char keyValueSeparator) {
      boolean isExtension = (peekChar() == '[');
      boolean isParenthesized = (peekChar() == '(');
      String name = readName(); // Option name.
      if (isExtension) {
        name = "[" + name + "]";
      }
      String subName = null;
      char c = readChar();
      if (c == '.') {
        // Read nested field name. For example "baz" in "(foo.bar).baz = 12".
        subName = readName();
        c = readChar();
      }
      if (c != keyValueSeparator) {
        throw unexpected("expected '" + keyValueSeparator + "' in option");
      }
      OptionKindAndValue kindAndValue = readKindAndValue();
      OptionElement.Kind kind = kindAndValue.kind();
      Object value = kindAndValue.value();
      if (subName != null) {
        value = OptionElement.create(subName, kind, value);
        kind = OptionElement.Kind.OPTION;
      }
      return OptionElement.create(name, kind, value, isParenthesized);
    }
docs: Reads a option containing a name, an '=' or ':', and a value.