================================================================================
Message
================================================================================

syntax = "proto3";

message Outer {
  option (my_option).a = true;
  option (another_option) = "a multi-line "
    "string literal which compiles but I can't find any information "
    'about in any specification';
  message Inner {
    int64 ival = 1;
  }
  repeated Inner inner_message = 2;
  EnumAllowingAlias enum_field =3;
  map<int32, string> my_map = 4;
  required string _string_field = 5;

  extend package.to.SubMessage {
    string extension_field = 100;
  }

  extensions 1000 to 1200;
  reserved 10 to 20;
  reserved field_name, "another_field_name";
}

extend another.Message {
  string field_to_add = 1000;
}

--------------------------------------------------------------------------------

(source_file
  (syntax)
  (message
    (message_name
      (identifier))
    (message_body
      (option
        name: (option_name
          (full_ident
            (identifier))
          (identifier))
        value: (bool
          (true)))
      (option
        name: (option_name
          (full_ident
            (identifier)))
        value: (string))
      (message
        (message_name
          (identifier))
        (message_body
          (field
            (type)
            (field_name
              (identifier))
            (field_number
              (int_lit
                (decimal_lit))))))
      (field
        (type
          (message_or_enum_type
            (identifier)))
        (field_name
          (identifier))
        (field_number
          (int_lit
            (decimal_lit))))
      (field
        (type
          (message_or_enum_type
            (identifier)))
        (field_name
          (identifier))
        (field_number
          (int_lit
            (decimal_lit))))
      (map_field
        (key_type)
        (type)
        (field_name
          (identifier))
        (field_number
          (int_lit
            (decimal_lit))))
      (field
        (type)
        (field_name
          (identifier))
        (field_number
          (int_lit
            (decimal_lit))))
      (extend
        (full_ident
          (identifier)
          (identifier)
          (identifier))
        (message_body
          (field
            (type)
            (field_name
              (identifier))
            (field_number
              (int_lit
                (decimal_lit))))))
      (extensions
        (ranges
          (range
            (int_lit
              (decimal_lit))
            (int_lit
              (decimal_lit)))))
      (reserved
        (ranges
          (range
            (int_lit
              (decimal_lit))
            (int_lit
              (decimal_lit)))))
      (reserved
        (field_names
          (identifier)
          (string)))))
  (extend
    (full_ident
      (identifier)
      (identifier))
    (message_body
      (field
        (type)
        (field_name
          (identifier))
        (field_number
          (int_lit
            (decimal_lit)))))))
