1// Sample .proto file that we can translate to the corresponding .fbs. 2 3option some_option = is_ignored; 4import "imported.proto"; 5 6package proto.test; 7 8/// Enum doc comment. 9enum ProtoEnum { 10 FOO = 1; 11/// Enum 2nd value doc comment misaligned. 12 BAR = 5; 13} 14 15/// 2nd table doc comment with 16/// many lines. 17message ProtoMessage { 18 // Ignored non-doc comment. 19 // A nested message declaration, will be moved to top level in .fbs 20 message OtherMessage { 21 optional double a = 26; 22 /// doc comment for b. 23 optional float b = 32 [default = 3.14149]; 24 } 25 optional int32 c = 12 [default = 16]; 26 optional int64 d = 1 [default = 0]; 27 optional uint32 p = 1; 28 optional uint64 e = 2; 29 /// doc comment for f. 30 optional sint32 f = 3 [default = -1]; 31 optional sint64 g = 4; 32 optional fixed32 h = 5; 33 optional fixed64 q = 6; 34 optional sfixed32 i = 7; 35 optional sfixed64 j = 8; 36 /// doc comment for k. 37 optional bool k = 9; 38 /// doc comment for l on 2 39 /// lines 40 required string l = 10; 41 optional bytes m = 11; 42 optional OtherMessage n = 12; 43 repeated string o = 14; 44 optional ImportedMessage z = 16; 45 /// doc comment for r. 46 oneof r { 47 /// doc comment for s. 48 ImportedMessage s = 17; 49 /// doc comment for t on 2 50 /// lines. 51 OtherMessage t = 18; 52 } 53} 54