Skip to content

Commit

Permalink
Don't require comma in inner(rule(..),)
Browse files Browse the repository at this point in the history
  • Loading branch information
CAD97 committed Oct 31, 2018
1 parent 65f7f4e commit db9e2b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pest-ast"
version = "0.3.2"
version = "0.3.3"
authors = ["cad97 <[email protected]>"]
description = "Derive to convert from pest parse tree to typed syntax tree"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion derive/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl Parse for InnerAttribute {
let inner = input.parse()?;
let paren = parenthesized!(content in input);
let (rule, comma) = if content.peek(kw::rule) {
(Some(content.parse()?), Some(content.parse()?))
(Some(content.parse()?), content.parse().ok().and_then(Some))
} else {
(None, None)
};
Expand Down

0 comments on commit db9e2b4

Please sign in to comment.