From d4da8cf0d6c5bbb4e0461a075eb1f4cb78499fba Mon Sep 17 00:00:00 2001 From: Tej Chajed Date: Fri, 2 Dec 2022 09:01:22 -0800 Subject: [PATCH] Fix identifier example in top-level docs Formerly this example wouldn't parse single-letter identifiers, which might confuse someone using it directly. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ec9ae67..a1a9792 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -256,7 +256,7 @@ //! ```rust,no_run //! # peg::parser!{grammar doc() for str { //! rule identifier() -//! = quiet!{[ 'a'..='z' | 'A'..='Z']['a'..='z' | 'A'..='Z' | '0'..='9' ]+} +//! = quiet!{[ 'a'..='z' | 'A'..='Z']['a'..='z' | 'A'..='Z' | '0'..='9' ]*} //! / expected!("identifier") //! # }} //! # fn main() {}