mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-16 09:11:55 +00:00
revset: simplify range expression rule by grouping operators
This commit is contained in:
parent
37e30a4b68
commit
f8aa6b1deb
1 changed files with 4 additions and 6 deletions
|
@ -29,6 +29,7 @@ children_op = { "+" }
|
||||||
|
|
||||||
dag_range_op = { ":" }
|
dag_range_op = { ":" }
|
||||||
range_op = { ".." }
|
range_op = { ".." }
|
||||||
|
range_ops = _{ dag_range_op | range_op }
|
||||||
|
|
||||||
union_op = { "|" }
|
union_op = { "|" }
|
||||||
intersection_op = { "&" }
|
intersection_op = { "&" }
|
||||||
|
@ -50,12 +51,9 @@ primary = {
|
||||||
neighbors_expression = { primary ~ (parents_op | children_op)* }
|
neighbors_expression = { primary ~ (parents_op | children_op)* }
|
||||||
|
|
||||||
range_expression = {
|
range_expression = {
|
||||||
neighbors_expression ~ dag_range_op ~ neighbors_expression
|
neighbors_expression ~ range_ops ~ neighbors_expression
|
||||||
| neighbors_expression ~ range_op ~ neighbors_expression
|
| neighbors_expression ~ range_ops
|
||||||
| neighbors_expression ~ range_op
|
| range_ops ~ neighbors_expression
|
||||||
| dag_range_op ~ neighbors_expression
|
|
||||||
| range_op ~ neighbors_expression
|
|
||||||
| neighbors_expression ~ dag_range_op
|
|
||||||
| neighbors_expression
|
| neighbors_expression
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue