Open zyxw59 opened 2 years ago
Idea:
get rid of the []
syntax for character classes, and replace it with anonymous categories (a feature I've thought of implementing anyway) using {}
; this frees up []
to use for grouping environments — &(a_b |(c_ _d))
would become a_b & [c_ | _d]
, which is a lot more readable, and doesn't require as many parens
The current syntax (
&(a_b |(c_ _d))
is unintuitive and a bit hard to read. It would be nice to have an infix syntax. The main challenge is grouping —(
is already a valid character to start a regex, so there's some parsing ambiguity if it's also used to group environments.