Skip to content

Commit

Permalink
修复括号语法糖关括号的捕获组数为1
Browse files Browse the repository at this point in the history
  • Loading branch information
A4-Tacks committed Jun 16, 2024
1 parent 65de6d1 commit 80a70b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 80a70b0

Please sign in to comment.