anchor.diff:                      flatten_defs(
                         absolutify_names(Defs)))))))).
   
  +parses_service_test() ->
  +    {ok,Defs} = parse_lines(["message m1 {required uint32 f1=1;}",
  +                             "message m2 {required uint32 f2=1;}",
  +                             "service s1 {",
  +                             "  rpc req(m1) returns (m2);",
  +                             "}"]),
  +    [{{msg,m1}, _},
  +     {{msg,m2}, _},
  +     {{service,s1},[{req,m1,m2}]}] =
  +        lists:sort(
  +          normalize_msg_field_options(
  +            enumerate_msg_fields(
  +              extend_msgs(
  +                resolve_refs(
  +                  reformat_names(
  +                    flatten_defs(
  +                      absolutify_names(Defs)))))))).
  +
  +
  +
   fetches_imports_test() ->
       {ok, Elems} = parse_lines(["package p1;"
                                  "import \"a/b/c.proto\";",
  
positive.code: extend_def -> extend identifier '{' msg_elems '}':
                                          {{extend,identifier_name('$2')},'$4'}.
  
  
  Erlang code.
  
  
negative.code:         option
          %% '(' and ')' for custom options
          extensions extend max to
          service rpc returns
          packed deprecated
          '.' ';' '(' ')' '{' '}' '[' ']' '=' ','
          .
  
  Rootsymbol
  