code: private MessageElement readMessage(Location location, String documentation) {
      String name = reader.readName();
  
      String previousPrefix = prefix;
      prefix = prefix + name + ".";
  
      ImmutableList.Builder<FieldElement> fields = ImmutableList.builder();
      ImmutableList.Builder<OneOfElement> oneOfs = ImmutableList.builder();
      ImmutableList.Builder<TypeElement> nestedTypes = ImmutableList.builder();
      ImmutableList.Builder<ExtensionsElement> extensions = ImmutableList.builder();
      ImmutableList.Builder<OptionElement> options = ImmutableList.builder();
      ImmutableList.Builder<ReservedElement> reserveds = ImmutableList.builder();
      ImmutableList.Builder<GroupElement> groups = ImmutableList.builder();
  
      reader.require('{');
      while (true) {
        String nestedDocumentation = reader.readDocumentation();
        if (reader.peekChar('}')) break;
  
        Object declared = readDeclaration(nestedDocumentation, Context.MESSAGE);
        if (declared instanceof FieldElement) {
          fields.add((FieldElement) declared);
        } else if (declared instanceof OneOfElement) {
          oneOfs.add((OneOfElement) declared);
        } else if (declared instanceof GroupElement) {
          groups.add((GroupElement) declared);
        } else if (declared instanceof TypeElement) {
          nestedTypes.add((TypeElement) declared);
        } else if (declared instanceof ExtensionsElement) {
          extensions.add((ExtensionsElement) declared);
        } else if (declared instanceof OptionElement) {
          options.add((OptionElement) declared);
        } else if (declared instanceof ExtendElement) {
          // Extend declarations always add in a global scope regardless of nesting.
          extendsList.add((ExtendElement) declared);
        } else if (declared instanceof ReservedElement) {
          reserveds.add((ReservedElement) declared);
        }
      }
      prefix = previousPrefix;
  
      return new MessageElement(
          location,
          name,
          documentation,
          nestedTypes.build(),
          options.build(),
          reserveds.build(),
          fields.build(),
          oneOfs.build(),
          extensions.build(),
          groups.build()
      );
    }
docs: Reads a message declaration.