gameServer2/src/protocol/parser.rs
changeset 13775 5fb40c8e5542
parent 13771 4664da990556
child 13810 0463a4221327
equal deleted inserted replaced
13774:0118b7412570 13775:5fb40c8e5542
   195                 value: opt_param >>
   195                 value: opt_param >>
   196                 (GameCfg::Ammo(name, value)))
   196                 (GameCfg::Ammo(name, value)))
   197     | do_parse!(tag!("SCHEME")   >> eol >>
   197     | do_parse!(tag!("SCHEME")   >> eol >>
   198                 name: a_line     >>
   198                 name: a_line     >>
   199                 values: opt!(preceded!(eol, separated_list!(eol, a_line))) >>
   199                 values: opt!(preceded!(eol, separated_list!(eol, a_line))) >>
   200                 (GameCfg::Scheme(name, values)))
   200                 (GameCfg::Scheme(name, values.unwrap_or(Vec::new()))))
   201     | do_parse!(tag!("FEATURE_SIZE") >> eol >>
   201     | do_parse!(tag!("FEATURE_SIZE") >> eol >>
   202                 value: u32_line    >>
   202                 value: u32_line    >>
   203                 (GameCfg::FeatureSize(value)))
   203                 (GameCfg::FeatureSize(value)))
   204     | do_parse!(tag!("MAP")      >> eol >>
   204     | do_parse!(tag!("MAP")      >> eol >>
   205                 value: a_line    >>
   205                 value: a_line    >>