From 80a70b00638c28ad1baa7018744a46e2a8fda54f Mon Sep 17 00:00:00 2001 From: A4-Tacks Date: Sun, 16 Jun 2024 13:06:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8B=AC=E5=8F=B7=E8=AF=AD?= =?UTF-8?q?=E6=B3=95=E7=B3=96=E5=85=B3=E6=8B=AC=E5=8F=B7=E7=9A=84=E6=8D=95?= =?UTF-8?q?=E8=8E=B7=E7=BB=84=E6=95=B0=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/parser.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2395f7c..ebea052 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "mtsyntax-plus" -version = "0.2.1" +version = "0.2.2" dependencies = [ "peg", ] diff --git a/Cargo.toml b/Cargo.toml index 853c601..2093c0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mtsyntax-plus" -version = "0.2.1" +version = "0.2.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/parser.rs b/src/parser.rs index fe675a4..6d681e7 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -166,7 +166,7 @@ peg::parser!(grammar parser() for str { { Expr::Literal(format!("/){{,{b}}}/").into(), 0) } / "{" n:unum() "}" { Expr::Literal(format!("/){{{n}}}/").into(), 0) } - / { Expr::Literal("/)/".into(), 1) } + / { Expr::Literal("/)/".into(), 0) } ) { x } pub rule expr() -> Expr<'input>