Add Protocol Buffers

This commit is contained in:
Hanfei Shen
2013-02-22 15:19:13 +08:00
parent 063ba50952
commit 281e7456d5
2 changed files with 35 additions and 0 deletions

View File

@@ -1098,6 +1098,14 @@ Prolog:
extensions:
- .pro
Protocol Buffer:
type: markup
ace_mode: protobuf
aliases:
- protobuf
- Protocol Buffers
primary_extension: .proto
Puppet:
type: programming
color: "#cc5555"

View File

@@ -0,0 +1,27 @@
package tutorial;
option java_package = "com.example.tutorial";
option java_outer_classname = "AddressBookProtos";
message Person {
required string name = 1;
required int32 id = 2;
optional string email = 3;
enum PhoneType {
MOBILE = 0;
HOME = 1;
WORK = 2;
}
message PhoneNumber {
required string number = 1;
optional PhoneType type = 2 [default = HOME];
}
repeated PhoneNumber phone = 4;
}
message AddressBook {
repeated Person person = 1;
}