Skip to content

Commit

Permalink
revset: rewrite identifier rule in common infix-op rule pattern
Browse files Browse the repository at this point in the history
I don't remember why I made it defined recursively, but it's basically the
same as "primary ~ (infix_op ~ primary)*" rule.
  • Loading branch information
yuja committed Apr 7, 2024
1 parent 4ff9c32 commit cea68e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/src/revset.pest
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ whitespace = _{ " " | "\t" | "\r" | "\n" | "\x0c" }

identifier_part = @{ (ASCII_ALPHANUMERIC | "_" | "/")+ }
identifier = @{
identifier_part ~ ("." | "-" | "+" ) ~ identifier
| identifier_part
identifier_part ~ (("." | "-" | "+") ~ identifier_part)*
}
symbol = {
identifier
Expand Down

0 comments on commit cea68e1

Please sign in to comment.