diff --git a/codegen/src/parser.rs b/codegen/src/parser.rs index 680607de..55f29b64 100644 --- a/codegen/src/parser.rs +++ b/codegen/src/parser.rs @@ -88,10 +88,14 @@ named!(ignore<()>, do_parse!( alt!(tag!("package") | tag!("option") | tag!("import")) >> many1!(br) >> take_until_and_consume!(";") >> many0!(br) >> ())); +named!(service_ignore<()>, do_parse!(tag!("service") >> many1!(br) >> word >> many0!(br) >> tag!("{") >> + take_until_and_consume!("}") >> many0!(br) >> ())); + named!(message_or_enum, alt!( message => { |m| MessageOrEnum::Msg(m) } | enumerator => { |e| MessageOrEnum::Enum(e) } | - ignore => { |_| MessageOrEnum::Ignore } )); + ignore => { |_| MessageOrEnum::Ignore } | + service_ignore => { |_| MessageOrEnum::Ignore } )); named!(pub file_descriptor, do_parse!( many0!(br) >> syntax: opt!(syntax) >> many0!(br) >>