code: private RpcElement readRpc(String documentation) {
      RpcElement.Builder builder = RpcElement.builder()
          .name(readName())
          .documentation(documentation);
  
      if (readChar() != '(') throw unexpected("expected '('");
      DataType requestType = readDataType();
      if (!(requestType instanceof NamedType)) {
        throw unexpected("expected message but was " + requestType);
      }
      builder.requestType((NamedType) requestType);
      if (readChar() != ')') throw unexpected("expected ')'");
  
      if (!readWord().equals("returns")) throw unexpected("expected 'returns'");
  
      if (readChar() != '(') throw unexpected("expected '('");
      DataType responseType = readDataType();
      if (!(responseType instanceof NamedType)) {
        throw unexpected("expected message but was " + responseType);
      }
      builder.responseType((NamedType) responseType);
      if (readChar() != ')') throw unexpected("expected ')'");
  
      if (peekChar() == '{') {
        pos++;
        while (true) {
          String rpcDocumentation = readDocumentation();
          if (peekChar() == '}') {
            pos++;
            break;
          }
          Object declared = readDeclaration(rpcDocumentation, Context.RPC);
          if (declared instanceof OptionElement) {
            builder.addOption((OptionElement) declared);
          }
        }
      } else if (readChar() != ';') throw unexpected("expected ';'");
  
      return builder.build();
    }
docs: Reads an rpc and returns it.