-------- desc_test_comments.proto (*desc.FileDescriptor) --------
// This is the first detached comment for the syntax.

// This is a second detached comment.

// This is a third.

// Syntax comment...
syntax = "proto2"; // Syntax trailer.

// And now the package declaration
package foo.bar;

// option comments FTW!!!
option go_package = "github.com/jhump/protoreflect/internal/testprotos";

import public "google/protobuf/empty.proto";

import "desc_test_options.proto";

// Multiple white space lines (like above) cannot
// be preserved...

// We need a request for our RPC service below.
message /* detached message name */ /* request with a capital R */ Request /* trailer */ {
  option deprecated = true; // deprecated!

  // A field comment
  repeated int32 ids = /* detached tag */ /* tag numero uno */ 1 /*
       * tag trailer
       * that spans multiple lines...
       * more than two.
       */ [
    packed = true,
    // packed!
    json_name = "|foo|",
    // custom JSON!
    (testprotos.ffubar) = "abc",
    (testprotos.ffubarb) = "xyz"
  ]; // field trailer #1...

  // lead mfubar
  option (testprotos.mfubar) = true; // trailing mfubar

  // some detached comments

  // some detached comments

  // Another field comment

  // label comment
  optional /* type comment */ string /* name comment */ name = 2 [
    // default lead
    default = "fubar" // default trail
  ];

  extensions 100 to 200;

  extensions 201 to 250 [
    (testprotos.exfubarb) = "\000\001\002\003\004\005\006\007",
    (testprotos.exfubar) = "splat!"
  ];

  reserved 10 to 20, 30 to 50;

  reserved "foo", "bar", "baz";

  // Group comment
  optional group Extras = 3 {
    // trailer for Extras

    // this is a custom option
    option (testprotos.mfubar) = false;

    optional double dbl = 1;

    optional float flt = 2;

    option no_standard_descriptor_accessor = false;

    // Leading comment...
    optional string str = 3; // Trailing comment...
  }

  enum MarioCharacters /* "super"! */ {
    // trailer for enum

    // allow_alias comments!
    option allow_alias = true;

    MARIO = 1 [
      (testprotos.evfubars) = -314,
      (testprotos.evfubar) = 278
    ];

    LUIGI = 2 [
      (testprotos.evfubaruf) = 100,
      (testprotos.evfubaru) = 200
    ];

    PEACH = 3;

    BOWSER = 4;

    option (testprotos.efubars) = -321;

    WARIO = 5;

    WALUIGI = 6;

    SHY_GUY = 7 [(testprotos.evfubarsf) = 10101];

    HEY_HO = 7;

    MAGIKOOPA = 8;

    KAMEK = 8;

    SNIFIT = -101;

    option (testprotos.efubar) = 123;
  }

  // can be this or that
  oneof abc {
    // trailer for oneof abc

    string this = 4;

    int32 that = 5;
  }

  // can be these or those
  oneof xyz {
    // whoops?
    option (testprotos.oofubar) = "whoops!";

    string these = 6;

    int32 those = 7;
  }

  // map field
  map<string, string> things = 8;
}

// And next we'll need some extensions...

extend /* extendee comment */ Request /* extendee trailer */ {
  // trailer for extend block

  // comment for guid1
  optional uint64 guid1 = 123;

  // ... and a comment for guid2
  optional uint64 guid2 = 124;
}

message /* name leading comment */ AnEmptyMessage /* name trailing comment */ {
  // trailer for AnEmptyMessage

}

// Service comment
service /* service name */ RpcService {
  // service trailer
  // that spans multiple lines

  // option that sets field
  option (testprotos.sfubar) = { id:100 name:"bob" };

  option deprecated = false; // DEPRECATED!

  option (testprotos.sfubare) = VALUE;

  // Method comment
  rpc /* rpc name */ StreamingRpc /* comment A */ ( /* comment C */ stream Request ) returns ( /*comment E */ Request ); // compact method trailer

  rpc UnaryRpc ( Request ) returns ( google.protobuf.Empty ) {
    // trailer for method

    // this RPC is deprecated!
    option deprecated = true;

    option (testprotos.mtfubar) = 12.340000;

    option (testprotos.mtfubard) = 123.456000;
  }
}
-------- foo.bar.Request (*desc.MessageDescriptor) --------
// Multiple white space lines (like above) cannot
// be preserved...

// We need a request for our RPC service below.
message /* detached message name */ /* request with a capital R */ Request /* trailer */ {
  option deprecated = true; // deprecated!

  // A field comment
  repeated int32 ids = /* detached tag */ /* tag numero uno */ 1 /*
       * tag trailer
       * that spans multiple lines...
       * more than two.
       */ [
    packed = true,
    // packed!
    json_name = "|foo|",
    // custom JSON!
    (testprotos.ffubar) = "abc",
    (testprotos.ffubarb) = "xyz"
  ]; // field trailer #1...

  // lead mfubar
  option (testprotos.mfubar) = true; // trailing mfubar

  // some detached comments

  // some detached comments

  // Another field comment

  // label comment
  optional /* type comment */ string /* name comment */ name = 2 [
    // default lead
    default = "fubar" // default trail
  ];

  extensions 100 to 200;

  extensions 201 to 250 [
    (testprotos.exfubarb) = "\000\001\002\003\004\005\006\007",
    (testprotos.exfubar) = "splat!"
  ];

  reserved 10 to 20, 30 to 50;

  reserved "foo", "bar", "baz";

  // Group comment
  optional group Extras = 3 {
    // trailer for Extras

    // this is a custom option
    option (testprotos.mfubar) = false;

    optional double dbl = 1;

    optional float flt = 2;

    option no_standard_descriptor_accessor = false;

    // Leading comment...
    optional string str = 3; // Trailing comment...
  }

  enum MarioCharacters /* "super"! */ {
    // trailer for enum

    // allow_alias comments!
    option allow_alias = true;

    MARIO = 1 [
      (testprotos.evfubars) = -314,
      (testprotos.evfubar) = 278
    ];

    LUIGI = 2 [
      (testprotos.evfubaruf) = 100,
      (testprotos.evfubaru) = 200
    ];

    PEACH = 3;

    BOWSER = 4;

    option (testprotos.efubars) = -321;

    WARIO = 5;

    WALUIGI = 6;

    SHY_GUY = 7 [(testprotos.evfubarsf) = 10101];

    HEY_HO = 7;

    MAGIKOOPA = 8;

    KAMEK = 8;

    SNIFIT = -101;

    option (testprotos.efubar) = 123;
  }

  // can be this or that
  oneof abc {
    // trailer for oneof abc

    string this = 4;

    int32 that = 5;
  }

  // can be these or those
  oneof xyz {
    // whoops?
    option (testprotos.oofubar) = "whoops!";

    string these = 6;

    int32 those = 7;
  }

  // map field
  map<string, string> things = 8;
}
-------- foo.bar.Request.ids (*desc.FieldDescriptor) --------
// A field comment
repeated int32 ids = /* detached tag */ /* tag numero uno */ 1 /*
     * tag trailer
     * that spans multiple lines...
     * more than two.
     */ [
  packed = true,
  // packed!
  json_name = "|foo|",
  // custom JSON!
  (testprotos.ffubar) = "abc",
  (testprotos.ffubarb) = "xyz"
]; // field trailer #1...
-------- foo.bar.Request.name (*desc.FieldDescriptor) --------
// some detached comments

// some detached comments

// Another field comment

// label comment
optional /* type comment */ string /* name comment */ name = 2 [
  // default lead
  default = "fubar" // default trail
];
-------- foo.bar.Request.extras (*desc.FieldDescriptor) --------
// Group comment
optional group Extras = 3 {
  // trailer for Extras

  // this is a custom option
  option (testprotos.mfubar) = false;

  optional double dbl = 1;

  optional float flt = 2;

  option no_standard_descriptor_accessor = false;

  // Leading comment...
  optional string str = 3; // Trailing comment...
}
-------- foo.bar.Request.this (*desc.FieldDescriptor) --------
string this = 4;
-------- foo.bar.Request.that (*desc.FieldDescriptor) --------
int32 that = 5;
-------- foo.bar.Request.these (*desc.FieldDescriptor) --------
string these = 6;
-------- foo.bar.Request.those (*desc.FieldDescriptor) --------
int32 those = 7;
-------- foo.bar.Request.things (*desc.FieldDescriptor) --------
// map field
map<string, string> things = 8;
-------- foo.bar.Request.abc (*desc.OneOfDescriptor) --------
oneof abc {
  string this = 4;

  int32 that = 5;
}
-------- foo.bar.Request.xyz (*desc.OneOfDescriptor) --------
oneof xyz {
  option (testprotos.oofubar) = "whoops!";

  string these = 6;

  int32 those = 7;
}
-------- foo.bar.Request.Extras (*desc.MessageDescriptor) --------
// Group comment
message /* group name */ Extras {
  // trailer for Extras

  // this is a custom option
  option (testprotos.mfubar) = false;

  optional double dbl = 1;

  optional float flt = 2;

  option no_standard_descriptor_accessor = false;

  // Leading comment...
  optional string str = 3; // Trailing comment...
}
-------- foo.bar.Request.Extras.dbl (*desc.FieldDescriptor) --------
optional double dbl = 1;
-------- foo.bar.Request.Extras.flt (*desc.FieldDescriptor) --------
optional float flt = 2;
-------- foo.bar.Request.Extras.str (*desc.FieldDescriptor) --------
// Leading comment...
optional string str = 3; // Trailing comment...
-------- foo.bar.Request.ThingsEntry (*desc.MessageDescriptor) --------
message ThingsEntry {
  option map_entry = true;

  optional string key = 1;

  optional string value = 2;
}
-------- foo.bar.Request.ThingsEntry.key (*desc.FieldDescriptor) --------
optional string key = 1;
-------- foo.bar.Request.ThingsEntry.value (*desc.FieldDescriptor) --------
optional string value = 2;
-------- foo.bar.Request.MarioCharacters (*desc.EnumDescriptor) --------
enum MarioCharacters /* "super"! */ {
  // trailer for enum

  // allow_alias comments!
  option allow_alias = true;

  MARIO = 1 [
    (testprotos.evfubars) = -314,
    (testprotos.evfubar) = 278
  ];

  LUIGI = 2 [
    (testprotos.evfubaruf) = 100,
    (testprotos.evfubaru) = 200
  ];

  PEACH = 3;

  BOWSER = 4;

  option (testprotos.efubars) = -321;

  WARIO = 5;

  WALUIGI = 6;

  SHY_GUY = 7 [(testprotos.evfubarsf) = 10101];

  HEY_HO = 7;

  MAGIKOOPA = 8;

  KAMEK = 8;

  SNIFIT = -101;

  option (testprotos.efubar) = 123;
}
-------- foo.bar.Request.MarioCharacters.MARIO (*desc.EnumValueDescriptor) --------
MARIO = 1 [
  (testprotos.evfubars) = -314,
  (testprotos.evfubar) = 278
];
-------- foo.bar.Request.MarioCharacters.LUIGI (*desc.EnumValueDescriptor) --------
LUIGI = 2 [
  (testprotos.evfubaruf) = 100,
  (testprotos.evfubaru) = 200
];
-------- foo.bar.Request.MarioCharacters.PEACH (*desc.EnumValueDescriptor) --------
PEACH = 3;
-------- foo.bar.Request.MarioCharacters.BOWSER (*desc.EnumValueDescriptor) --------
BOWSER = 4;
-------- foo.bar.Request.MarioCharacters.WARIO (*desc.EnumValueDescriptor) --------
WARIO = 5;
-------- foo.bar.Request.MarioCharacters.WALUIGI (*desc.EnumValueDescriptor) --------
WALUIGI = 6;
-------- foo.bar.Request.MarioCharacters.SHY_GUY (*desc.EnumValueDescriptor) --------
SHY_GUY = 7 [(testprotos.evfubarsf) = 10101];
-------- foo.bar.Request.MarioCharacters.HEY_HO (*desc.EnumValueDescriptor) --------
HEY_HO = 7;
-------- foo.bar.Request.MarioCharacters.MAGIKOOPA (*desc.EnumValueDescriptor) --------
MAGIKOOPA = 8;
-------- foo.bar.Request.MarioCharacters.KAMEK (*desc.EnumValueDescriptor) --------
KAMEK = 8;
-------- foo.bar.Request.MarioCharacters.SNIFIT (*desc.EnumValueDescriptor) --------
SNIFIT = -101;
-------- foo.bar.AnEmptyMessage (*desc.MessageDescriptor) --------
message /* name leading comment */ AnEmptyMessage /* name trailing comment */ {
  // trailer for AnEmptyMessage

}
-------- foo.bar.guid1 (*desc.FieldDescriptor) --------
extend /* extendee comment */ Request /* extendee trailer */ {
  // comment for guid1
  optional uint64 guid1 = 123;
}
-------- foo.bar.guid2 (*desc.FieldDescriptor) --------
extend Request {
  // ... and a comment for guid2
  optional uint64 guid2 = 124;
}
-------- foo.bar.RpcService (*desc.ServiceDescriptor) --------
// Service comment
service /* service name */ RpcService {
  // service trailer
  // that spans multiple lines

  // option that sets field
  option (testprotos.sfubar) = { id:100 name:"bob" };

  option deprecated = false; // DEPRECATED!

  option (testprotos.sfubare) = VALUE;

  // Method comment
  rpc /* rpc name */ StreamingRpc /* comment A */ ( /* comment C */ stream Request ) returns ( /*comment E */ Request ); // compact method trailer

  rpc UnaryRpc ( Request ) returns ( google.protobuf.Empty ) {
    // trailer for method

    // this RPC is deprecated!
    option deprecated = true;

    option (testprotos.mtfubar) = 12.340000;

    option (testprotos.mtfubard) = 123.456000;
  }
}
-------- foo.bar.RpcService.StreamingRpc (*desc.MethodDescriptor) --------
// Method comment
rpc /* rpc name */ StreamingRpc /* comment A */ ( /* comment C */ stream Request ) returns ( /*comment E */ Request ); // compact method trailer
-------- foo.bar.RpcService.UnaryRpc (*desc.MethodDescriptor) --------
rpc UnaryRpc ( Request ) returns ( google.protobuf.Empty ) {
  // trailer for method

  // this RPC is deprecated!
  option deprecated = true;

  option (testprotos.mtfubar) = 12.340000;

  option (testprotos.mtfubard) = 123.456000;
}
