Skip to content

Commit

Permalink
fix(pilota-thrift-parser): match comment after annotations in EnumVal…
Browse files Browse the repository at this point in the history
…ue (#287)
  • Loading branch information
Millione authored Nov 6, 2024
1 parent 0218b92 commit 99e45fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pilota-thrift-parser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 3 additions & 2 deletions pilota-thrift-parser/src/parser/enum_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
}"#,
)
Expand Down

0 comments on commit 99e45fe

Please sign in to comment.