diff --git a/Cargo.lock b/Cargo.lock index 0d03c2c..efb12a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -884,7 +884,7 @@ dependencies = [ [[package]] name = "pilota-thrift-parser" -version = "0.11.4" +version = "0.11.5" dependencies = [ "nom", ] diff --git a/pilota-thrift-parser/Cargo.toml b/pilota-thrift-parser/Cargo.toml index 2fde13b..8c8a57c 100644 --- a/pilota-thrift-parser/Cargo.toml +++ b/pilota-thrift-parser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pilota-thrift-parser" -version = "0.11.4" +version = "0.11.5" edition = "2021" description = "Pilota thrift Parser." documentation = "https://docs.rs/pilota" diff --git a/pilota-thrift-parser/src/parser/enum_.rs b/pilota-thrift-parser/src/parser/enum_.rs index ee82fdf..2cd1a82 100644 --- a/pilota-thrift-parser/src/parser/enum_.rs +++ b/pilota-thrift-parser/src/parser/enum_.rs @@ -23,8 +23,9 @@ impl Parser for EnumValue { opt(blank), opt(Annotations::parse), opt(list_separator), + opt(blank), )), - |(name, _, value, _, annotations, _)| EnumValue { + |(name, _, value, _, annotations, _, _)| EnumValue { name, value, annotations: annotations.unwrap_or_default(), @@ -66,7 +67,7 @@ mod tests { let (_remain, _e) = Enum::parse( r#"enum Sex { UNKNOWN = 0, - MALE = 1, + MALE = 1 (pilota.key="male") // male FEMALE = 2, }"#, )